If I need an accept button to change according to which group box a user is in, what do I need to check for? is it groupbox.got focus or something similar?
Printable View
If I need an accept button to change according to which group box a user is in, what do I need to check for? is it groupbox.got focus or something similar?
there is an even called Enter that is fired when it gets the focus, but dunno if you can really implement that feature nicely
Hi,
In the ENTER event of each groupbox, either change the Text property of the button and then test for that Text on the button's click event, or set a variable to a value which you then check on the click event.
The ENTER event of a groupbox fires whenever any object contained in that groupbox receives focus etc. It does not fire when the cursor moves over the groupbox or contained objects, neither does it fire on a right click.
Also, look out for some wierd results, e.g. If there is a textbox in the groupbox, the enter event will fire when the groupbox first becomes visible.