[Gambas-user] Slider problem?

Benoît Minisini gambas at ...1...
Sat Sep 12 02:54:28 CEST 2009


> Benoît Minisini schreef:
> >> Benoît Minisini schreef:
> >>>> If you disable a Slider, so Slider1.Enabled = FALSE , it still fires
> >>>> it's MouseUp event when clicked.
> >>>> This is not what I expected. Is this expected behaviour?
> >>>>
> >>>> Gambas 2.16.0 gb.qt.
> >>>>
> >>>> Regards,
> >>>> Ron_2nd.
> >>>
> >>> This is not a bug, this is by design.
> >>>
> >>> The bug is in gb.gtk, where mouse events are not raised when Enabled is
> >>> False, and often not raised too when Enabled is True.
> >>>
> >>> Regards,
> >>
> >> Hmm ok, i'm using gb.qt, so because of a bug in gb.gtk you change it's
> >> behaviour too..
> >> I forgive you if you promise me we don't end up like visual basic ;-)
> >>
> >> Regards,
> >> Ron_2nd.
> >
> > I didn't change the behaviour of gb.qt because of gb.gtk. Mouse events
> > must be always raised, whatever the value of the Enabled property.
> >
> > Regards,
> 
> Ok understand now.
> 
> I have to change my code a bit to not run into trouble then when a user
> clicks the disabled control...
> 
> Regards,
> Ron_2nd.
> 

Apparently having the same behaviour in gb.gtk than in gb.qt is impossible. 
You cannot catch events in gb.gtk before they are processed.

So I think you will be pleased :-), I have to do the contrary: prevent a 
disabled control to raise *any* event in gb.qt.

Regards,

-- 
Benoît Minisini




More information about the User mailing list