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

Jesus ea7dfh at ...2382...
Wed Jun 5 18:41:41 CEST 2013


El 05/06/13 02:52, Benoît Minisini escribió:

<stripped>

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

That's something that someone else was waiting for ;-)

Read the quote below.

Regards

Jesus Guardon

>
>
> Le 10/03/2013 18:34, Jesus a écrit :
>> Hi all
>>
>> Since gambas2 I've not used Valuebox until now in Gambas3, but now I'm
>> surprised it haven't a '_Change()' event. Anyone could tell about it, if
>> you have got the need of this event or not? And how I supposedly could
>> detect whether its content has changed?
>>
>> Of course, I always can inherit and implement a change event, but I was
>> curious on why this widget lacks the change event natively.
>>
>> Thanks for your time
>>
>> Best regards
>>
>
> Mmm... You're right, a Change event would be useful... I will see if I
> can add it...
>
> As a workaround, you can create an observer on the first inner child of
> the control to catch it.
>
> hObs = New Observer(TheValueBox.Children[0]) As "TheValueBox"
> ...
> Public Sub TheValueBox_Change()
> ...
> End
>
> But beware that you must do it just after having set the Type property
> (because it recreates the inner widget each time you change the ValueBox
> type).
>
> Regards,
>
> -- Benoît Minisini

-- 
Jesus Guardon




More information about the User mailing list