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? > 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. Mattias _______________________________________________ Lazarus mailing list [email protected] http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
