Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Confused
Message
 
To
01/10/1998 18:08:10
Senna Dwipayana
Indo Rebel Apparel Cv
Bandung, Indonesia
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00143059
Message ID:
00143081
Views:
24
>Sorry for asking so much lately but
Don't be sorry, that's what we're here for ;-)

>I can't remove listbox by making any code on textbox.lostfocus, cuz the listbox should be able to access by mouse click.
You can avoid this situation by checking the current object under the mouse (see example below).
>To make it simple, just say, I want to make listbox disapear if the active control not in the textbox nor the listbox.
PROCEDURE text1.LostFocus
	oMouseOverObject = sys(1270)
	if type("oMouseOverObject" ) # "O" or ! oMouseOverObject.name = 'List1'
		thisform.List1.visible = .f.
	endif
ENDPROC

PROCEDURE text1.GotFocus
	thisform.List1.visible = .t.
ENDPROC

PROCEDURE list1.LostFocus
	oMouseOverObject = sys(1270)
	if type("oMouseOverObject") # "O" or ! oMouseOverObject.name $ 'Text1/Combo1'
		this.visible = .f.
	endif
ENDPROC

PROCEDURE combo1.LostFocus
	oMouseOverObject = sys(1270)
	if type("oMouseOverObject" ) # "O" or ! oMouseOverObject.name = 'List1'
		thisform.List1.visible = .f.
	endif
ENDPROC

PROCEDURE combo1.GotFocus
	thisform.List1.visible = .t.
ENDPROC
kenweber
GCom2 Solutions
Microsoft Certified Professional

Previous
Reply
Map
View

Click here to load this message in the networking platform