Re: [lazarus] LCL Message

2006-10-02 Thread Marc Weustink
Felipe Monteiro de Carvalho wrote: On 10/1/06, Marc Weustink [EMAIL PROTECTED] wrote: When a user clicks on the ListBox once, holds down the button pushed and changes the selected item, many OnClick events are generated. The same if he uses the keyboard to change the selected item. Yes,

Re: [lazarus] LCL Message

2006-10-02 Thread Felipe Monteiro de Carvalho
On 10/2/06, Marc Weustink [EMAIL PROTECTED] wrote: Depending on the key (not just anykay), maybe yes. For instance a enter on a button generates a click. That´s a good point. I tested this on delphi and you get the click when you release the button. If we don't do that - bug. For every

Re: [lazarus] LCL Message

2006-10-02 Thread Marc Weustink
Felipe Monteiro de Carvalho wrote: On 10/2/06, Marc Weustink [EMAIL PROTECTED] wrote: Depending on the key (not just anykay), maybe yes. For instance a enter on a button generates a click. That´s a good point. I tested this on delphi and you get the click when you release the button. If we

Re: [lazarus] LCL Message

2006-10-02 Thread Felipe Monteiro de Carvalho
On 10/2/06, Marc Weustink [EMAIL PROTECTED] wrote: Don't think so. It's maybe a limitation of the implementation for Qt, but for GTK we had the same problem. There we also track the mousebuttons to see if they were pressed. If so then click, otherwise not. I've to admit that the button state

Re: [lazarus] LCL Message

2006-10-02 Thread Marc Weustink
Felipe Monteiro de Carvalho wrote: On 10/2/06, Marc Weustink [EMAIL PROTECTED] wrote: Don't think so. It's maybe a limitation of the implementation for Qt, but for GTK we had the same problem. There we also track the mousebuttons to see if they were pressed. If so then click, otherwise not.

Re: [lazarus] LCL Message

2006-10-01 Thread Luis R. Hilario B.
LM_SELCHANGE send OnSelectionChange and next OnClick, but not only in Qt also in GTK. Bug or feature? 2006/9/19, Felipe Monteiro de Carvalho [EMAIL PROTECTED]: Ok, something very strange is going on. I added a slot for the itemchanged signal that looks like this: procedure

Re: [lazarus] LCL Message

2006-10-01 Thread Marc Weustink
Luis R. Hilario B. wrote: LM_SELCHANGE send OnSelectionChange and next OnClick, but not only in Qt also in GTK. Bug or feature? partly. Delphi send an onclick if the selction changes by a user event. We try to be compatible with that. AFAIK, a OnSelectionChange is sent always. Marc

Re: [lazarus] LCL Message

2006-10-01 Thread Felipe Monteiro de Carvalho
On 10/1/06, Marc Weustink [EMAIL PROTECTED] wrote: Delphi send an onclick if the selction changes by a user event. Is there a reason why this is like that} AFAIK, a OnSelectionChange is sent always. So how can our widgetset tell LCL only to send a OnSelectionChange event and *not* a

Re: [lazarus] LCL Message

2006-10-01 Thread Marc Weustink
Felipe Monteiro de Carvalho wrote: On 10/1/06, Marc Weustink [EMAIL PROTECTED] wrote: Delphi send an onclick if the selction changes by a user event. Is there a reason why this is like that} AFAIK, a OnSelectionChange is sent always. So how can our widgetset tell LCL only to send a

Re: [lazarus] LCL Message

2006-10-01 Thread Luis R. Hilario B.
It seems me that is done in the following way: procedure TQtMemoStrings.IsChanged; begin if Assigned((FOwner as TCustomMemo).OnChange) then begin (FOwner as TCustomMemo).Modified := False; (FOwner as TCustomMemo).OnChange(self); end; end; But I agree not to change that, because

Re: [lazarus] LCL Message

2006-10-01 Thread Felipe Monteiro de Carvalho
On 10/1/06, Luis R. Hilario B. [EMAIL PROTECTED] wrote: But I agree not to change that, because Qtwidgetset should work the same as Gtkwidgetset, etc., although be an error. Somewhere I read that Wine emulated windows bug by bug. It seams to me that we are also emulating bugs in VCL =) --

Re: [lazarus] LCL Message

2006-10-01 Thread Marc Weustink
Felipe Monteiro de Carvalho wrote: On 10/1/06, Luis R. Hilario B. [EMAIL PROTECTED] wrote: But I agree not to change that, because Qtwidgetset should work the same as Gtkwidgetset, etc., although be an error. Somewhere I read that Wine emulated windows bug by bug. It seams to me that we

Re: [lazarus] LCL Message

2006-10-01 Thread Felipe Monteiro de Carvalho
On 10/1/06, Marc Weustink [EMAIL PROTECTED] wrote: When a user clicks on the ListBox once, holds down the button pushed and changes the selected item, many OnClick events are generated. The same if he uses the keyboard to change the selected item. Yes, that are keyclicks (or not ?) But if

Re: [lazarus] LCL Message

2006-09-23 Thread Mattias Gaertner
On Tue, 19 Sep 2006 21:44:10 -0300 Felipe Monteiro de Carvalho [EMAIL PROTECTED] wrote: Ok, something very strange is going on. I added a slot for the itemchanged signal that looks like this: procedure TQtListWidget.SlotSelectionChange(current: QListWidgetItemH; previous:

Re: [lazarus] LCL Message

2006-09-22 Thread Felipe Monteiro de Carvalho
I will send this patch to be applied. -- Felipe Monteiro de Carvalho _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives

Re: [lazarus] LCL Message

2006-09-22 Thread Luis R. Hilario B.
That same I suggest, so that it is not lost. 2006/9/22, Felipe Monteiro de Carvalho [EMAIL PROTECTED]: I will send this patch to be applied. -- Felipe Monteiro de Carvalho _ To unsubscribe: mail [EMAIL PROTECTED] with

[lazarus] LCL Message

2006-09-19 Thread Luis R. Hilario B.
Hello, I implemented ListBox.Onclick and ListBox.OnSelectionChange, but they do not work correctly. OnSelectionChange sends messages of all types and OnClick does not want to send Onclick (But I see the sign in Qt when I click an item). View file ListBoxonclick.diff. If someone understands

Re: [lazarus] LCL Message

2006-09-19 Thread Felipe Monteiro de Carvalho
On 9/19/06, Luis R. Hilario B. [EMAIL PROTECTED] wrote: If someone understands what is happening that he fix him because no longer I know what to do. I will investigate this. -- Felipe Monteiro de Carvalho _ To unsubscribe:

Re: [lazarus] LCL Message

2006-09-19 Thread Felipe Monteiro de Carvalho
Ok, I already found many things. To start with, that SetSlot implementation I pointed you at, from TButton was very wrong and old. This is what all SetSlots events should look like: class procedure TQtWSCustomListBox.SetSlots(const QtListWidget: TQtListWidget); var Method: TMethod; Hook :

Re: [lazarus] LCL Message

2006-09-19 Thread Felipe Monteiro de Carvalho
Ok, something very strange is going on. I added a slot for the itemchanged signal that looks like this: procedure TQtListWidget.SlotSelectionChange(current: QListWidgetItemH; previous: QListWidgetItemH); cdecl; var Msg: TLMessage; begin FillChar(Msg, SizeOf(Msg), #0); Msg.Msg :=