Zitat von Michael Van Canneyt <[EMAIL PROTECTED]>: > On Wed, 9 Jul 2008, Mattias Gärtner wrote: > > > Zitat von Michael Van Canneyt <[EMAIL PROTECTED]>: > > > > > Hi, > > > > > > In GTK 1, the TCombobox somehow looses the 'OnChange' event after it was > > > fired > > > once, but only when the items list is sorted. > > > > > > Steps to reproduce: > > > - Drop TCombobox on a new form > > > - Set items (one two three four five) > > > - Set Sorted=True - this is required !! > > > - Set Style=csDropDownlist (don't know if this is required) > > > - In OnChange event handler show a message or something like it. > > > - Run project. > > > - Select item. Message appears. > > > - Select another item. Message does not appear. > > > > > > The event handler is still <> Nil (I added code to check this), > > > but is simply never called any more when something is selected. > > > > > > And in GTK 2 the event handler is always called twice !! > > > > The GTK2 sends an LMCHANGED for the change of the edit and an LMSELCHANGE > for > > the change of the ItemIndex. > > The LCL sends the second OnChange if OnSelect is nil. I don't know why. > > Maybe the LCL should be extended to not send the change two times? > > Yes, because this is not consistent with the other widgetsets, and not > consistent with Delphi ?
I don't know if the OnChange is wrong or the OnSelect<>nil test is wrong. gtk1 does not send LMSELCHANGE events, so there the case does not happen. > > > Is this a known issue ? I'm using Lazarus revision 15540. > > > Should I add it to the bug tracker ? > > > Because this is IMHO a major regression... > > > > I will take a look at gtk1. > > Thanks. That would be great. Please try 15725. Mattias _______________________________________________ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus