Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Focus in optiongroup
Message
From
15/05/1999 11:51:30
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Title:
Focus in optiongroup
Miscellaneous
Thread ID:
00219336
Message ID:
00219336
Views:
60
I'm having heavy-duty hands-down data entry form, with a bunch of optiongroups. The optiongroups may have any number of optionbuttons, from two to nine. The reason I've put the bold on "entry" is that I want the group to be capable of handling the Enter key as if it were a textbox, i.e. "accept the value already there and lose focus". The trouble is that when the optiongroup receives the focus, the focus lands on Option1, whichthe selected button is Option1, even though the group's value is 5 and the selected button should be Option5. If I press Enter, the value will get to be 1 and not 5.

Unfortunately, the optiongroup has no GotFocus event; I've added a SetFocus event, but it fires only when I tell it.
I've tried to do something with the GotFocus of Option1 (there's only one button in the class definition - the others are added during optiongroup.init) - to setfocus to the button which should have it, but then it interfered with the click of the button itself etc etc.

Is there any better way to have the focus land on the button which corresponds to the actual value of the group, as soon as the group gets the focus (even though it doesn't have a GotFocus)?

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Next
Reply
Map
View

Click here to load this message in the networking platform