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

Benoît Minisini gambas at ...1...
Wed Jun 5 02:52:58 CEST 2013


Le 05/06/2013 02:45, Bruce a écrit :
> (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
>

Mmm, I think you need ValueBox to raise sort of "Change" event, don't you?

-- 
Benoît Minisini




More information about the User mailing list