[Gambas-user] ValueBox (Date) detecting a change in the Value

Bruce bbruen at ...2308...
Wed Jun 5 02:45:27 CEST 2013


(I must be having a senior moment!)

I am using a ValueBox to allow the user to select a date which is a
partial key for a database read. But, how can I detect that the user has
altered the value and so initiate the db read?

The full key consists of a string value from a preceding combobox
control and the date from this control. So the overall logic I need to
achieve is
1) cboVenue_LostFocus
    If the valDate.Value <> 0 then ReadDB(cboVenue.Current.Text,
valDate.Value) otherwise valDate.SetFocus (this works fine)

2) valDate_???
    If cboVenue.Current.Text then ReadDB(cboVenue.Current.Text,
valDate.Value) otherwise cboVenue.SetFocus

valDate_LostFocus fires if the user tabs from the ValueBox textbox into
the button, at which point the date has not been set.

The "dwgMonth" control (the calendar popup) does not seem to raise
events.

The user could enter the date as text in the ValueBox text area or use
the calendar popup to select a date and either press the return key or
double click the mouse. Both the latter result in the focus going back
to the ValueBox text area.

tia
Bruce









More information about the User mailing list