[Gambas-user] Stopping an event when user clicks on the form menu

Bruce bbruen at ...2308...
Fri Jan 24 00:26:26 CET 2014


I have a form with a textbox that "MUST" be filled in before moving on
to the next control or any other control within the form. Fine, so I
implement a txtManditory_LostFocus method that just checks that there is
some text in there.

My problems are:
1) if the entire form loses focus, the lostfocus event fires.
2) if the user tries to click on the form menu the lost focus event
fires.

I think I have got around 1) by using Object.Lock in a Form_Leave()
handler, but 2) has got me stumped.

Any clues?

tia
Bruce





More information about the User mailing list