[Gambas-user] How do events work?

R Onstenk ronstk at ...239...
Fri Aug 29 15:13:16 CEST 2003


I have a form with 2 comboboxes.
First is product group and the second are the items in that group
After selecting the group then the items are updated and
the user can make a choise for one of the items.
Going to the item combo can be done with the tab key or clicking on it.
At this moment the Enter or Gotfocus is expected to occur for the item combo
and Leave and/or Lostfocus for the product combo.
If there is only 1 item the user can go without selection in the second
combo
to the item information presented below those combos.

Any way, good or bad program flow, the following code does not work at all
Starting with:
PUBLIC SUB cbxParent_LostFocus()'Raised when the control loses the focus.

' PRIVATE was not doing anything
' made it PUBLIC give stack overflow
' add STATIC still not working
' the the last one STATIC PRIVATE, also not working
' what hell is going wrong?
STATIC PRIVATE SUB cbxProduct_LostFocus()'Raised when the control loses the
focus.
  Message ("cbxProduct_LostFocus")
END
STATIC PRIVATE SUB cbxProduct_Leave()'Raised when the mouse leaves the
control.
  Message ("cbxProduct_Leave")
END
STATIC PRIVATE SUB cbxItem_GotFocus() 'Raised when the control gets the
focus. does not work
  Message ("cbxItem_GotFocus")
END
STATIC PRIVATE SUB cbxItem_Enter()'Raised when the mouse enters the control.
  Message ("cbxItem_Enter")
END





More information about the User mailing list