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

------------------------------------------------------------------------------
Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester  
Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the  
endpoint security space. For insight on selecting the right partner to 
tackle endpoint security challenges, access the full report. 
http://p.sf.net/sfu/symantec-dev2dev
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to