Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Lostfocus on Optiongroup

Status
Not open for further replies.

JackTheC

Programmer
Feb 25, 2002
324
NL
Ever needed a Lostfocus event/method on an Optiongroup control? Well, there is no.

But you can simulate it in this way:
Put the Optiongroup inside a Container control with BorderWidth=0, making the Container invisible.
The Container has a Lostfocus event firing when the Optiongroup is losing focus to another control.

The same goes for the Gotfocus event/method.

I never needed a Container control on a form before, but in this case it comes in handy.




 
Hello,

you are correct, thanks.
Or maybe you can use the .valid()

regards
tom
 
This could be worth knowing.

The individual option buttons have a LostFocus, but of course that's not the same thing as for the group as a whole.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Tomk3 said:
you are correct, thanks.
Or maybe you can use the .valid()

regards
tom

No the .valid event fires when you click an option. Not when the focus leaves the optiongroup, with or without changing the value.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top