Setting Spinner and its Buddy

  • Thread starter Thread starter MSDousti
  • Start date Start date
M

MSDousti

Hello

I want to put a Spinner and set an Edit to its Buddy. I have some
problems:

1- I want the spinner to add/subtract 0.01 to/from the number shown in
Edit, but it just works with integers(0,1,2,3,etc.)

2-When I press ENTER on the Edit box, it terminates my program and
returns to my code (without any error)

Could anyone help me?
 
I can't describe this as a difinitive answer, it's what I'd "hack" out faced
with the same problem. Is it a dialog App? IIRC, I think I've seen in my
own dialog apps that the Enter key still results in OnOK being called even
if the OK button is removed and there is no default button. You could make
any other appropriate button the default button, replace OnOK with an empty
implementation, consume the Enter key before the framework sees it, etc.
Some of these are probably less appropriate than others. On the spinner,
you could unhook it from the edit control and handle the messages from the
spinner yourself and manipulate the edit control any way you want.
 
Back
Top