>Sorry for asking so much lately but
>Does anyone know how to determine whether the focus goes to object a or b >?
>if I have 3 object in a form, a textbox,listbox and combobox,
>if the focus goes to combobox, I want to minimize or remove listbox from >myform, I can't remove listbox by making any code on textbox.lostfocus, cuz >the listbox should be able to access by mouse click.
>If I put remove object on combobox.gotfocus, it gonna be a big problem if I >have 20 object on the same form.
>To make it simple, just say, I want to make listbox disapear if the active control >not in the textbox nor the listbox.
>Quite hard for me to explain, so this is the best I can do, hope someone could >help.
can make things disappear by whatever.visible = .f.. did not exactly understand your situation, but you can listbox.visible = .f. in combo.gotfocus. then listbox.visible = .t.. in lostfocus. in the form.activate you may need something like if _screen.activeform.activecontrol.name = "comboboxname" listbox.visible = .f.. because the combo will losefocus (and listbox.visible = .t.) when you go to another application.
this may not be a very good solution. will think some more on it.
best of luck - brenda
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only