[Gambas-user] ProgressBar Change Event
Benoît Minisini
gambas at ...1...
Sun Jul 10 20:28:10 CEST 2011
> ok, maybe you are right.
>
> i explain my case:
> In my case the purpose to use a change event for progressbar is to
> inform user about the changes of its value within control and not from a
> variable which changes the value of the control.
> Only for this.
>
> For the data/view part i understand what are you saying.
> But the progressbar store its state to its value property.
>
> The difference is that the user cannot change its value from the
> keyboard but the program does it, ok.
>
> Also from another point of view there is a change to the property Value
> regardless that there is no implementation for this as an event, so far
> or an obvious purpose to use such an event.
>
> If the change event is used only for the input of user and how the user
> changes a value, it is ok, there is no need for a change event for
> progressbar. i just thought that the change event would described better
> the behavior of the progressbar to its operation independently of user
> actions.
>
If you really need that Change event, you can reimplement the ProgressBar
control in your project :
----[ ProgressBar.class ]-------------------------------------
' Gambas class file
Export
Event Change
Property Value As Float
Private Sub Value_Read() As Float
Return Super.Value
End
Private Sub Value_Write(Value As Float)
Super.Value = Value
Raise Change
End
--------------------------------------------------------------
Tell me if it works. :-)
--
Benoît Minisini
More information about the User
mailing list