[lazarus] New Bug Entered

Andrew Johnson aj_genius at hotmail.com
Sun Sep 29 22:52:42 EDT 2002

>I\'ve discovered that, unlike windows, an onmouseup event will fire even if 
>a user has clicked down and then dragged off the control.

>For instance... I\'m tracking changes in radio buttons with this event, 
>however if the user clicks down, then drags off the radio button, my 
>onmouseup event launches, but the radio button does not change.  I have no 
>way of knowing if the radio button was _ABOUT_ to change or not, because 
>this event launches before the change is actually made.

This is probably a duofold issue. the first and most important part is that 
in GTK RadioButton's don't handle events, because they are child controls.. 
which means that as long as the mousup is recievied by the parent, which it 
almost always will be, the focused child, will recieve it.  Since on mouse 
down focuses the control there is almost no way as stands to ensure that the 
mouse up event is NOT recieved by a radiobutton, or for the most part any 
control, unless we override the event handler to our own ends in the GTK 
interface.  The other issue is as you have deduced.. ToggleButton 
descendents recieve events before the state is changed, so it is hard to 
determine because of the first problem wether it is going to  change at all. 
I actually dealt with this problem in some of my code.. somwhere about three 
years ago. So if I can find the notes or code from then I may be able to 
produce a hack to fix it.

However.. this goes back to the incompatibility of standard GTK 
implementation of events versus Win32.. gaah.. I know. I will continue to 
search for a solution to all of these problems which is not temporary 
"hack", because GTK IS a powerful, and in many ways better design then 
windows,  capable of doing much to set these things up, but even all the 
docs and howto's say this is a complex issue..( and  when I hear that in the 
C world I cringe)


Chat with friends online, try MSN Messenger: http://messenger.msn.com

More information about the Lazarus mailing list