Attached is a patch that improves TListBox/TComboBox in win32 It implements the…
Karl Brandt wrote 16 lines
I found on my computer a version from 17.12.2002 and there is the problem too.
Martin Smat.

Mailing lists / lazarus / 2003-01
5 messages · 3 people ·
Reply by email Subscribe to this list Your subscription
Read-only archive. Use j and k to move between messages.
Attached is a patch that improves TListBox/TComboBox in win32 It implements the…
I found on my computer a version from 17.12.2002 and there is the problem too.
Martin Smat.
Attached is a patch that improves TListBox/TComboBox in win32 It implements the properties Sorted, MultiSelect, ExtendedSelect and fix other issues.
It also cleans the recreatewnd interface code.
Togheter is a demo program i used to test the changes
Saying of TComboBox, the LCL doesn't notify to interface the CustomComboBox.Sorted state in CreateHandle. I propose to add in CreateHandle, after the creation of the interface StringList, a LM_SORT message to interface,maybe creating a UpdateSorted method, like in ListBox , so the interface can know/modify the design time Sorted state. ------
See TCustomListBox.GetSelected(Index : integer) : boolean; begin
if (Index < 0) or (Index >= Items.Count) then
raise Exception.Create('TCustomListBox.GetSelected: index'+IntToStr(Index)
+' out of bound. Count='+IntToStr(Items.Count));
if HandleAllocated then> Result:= (CNSendMessage(LM_GETSEL, Self, @Index) >= 0) -> allways true
else
Result:=clbiSelected in GetListBoxItemRecord(FItems,Index)^.Flags;end;
I don't know about the Gtk part but in win32 when a item is not selected it returns 0 otherwise >0.
So in win32 Result is allways True
It would not Result:= (CNSendMessage(LM_GETSEL, Self, @Index) > 0) the correct ?
Or we must check this in interface?
-----
BTW:
Sometimes the main window(of a lcl app) stops to respond ,being necessary to switch to another window and get back to respond again. Is someone getting the same problem?
Happy New Year :-)
Karl Brandt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: zip00008.zip
Type: application/octet-stream
Size: 6129 bytes
Desc: "win32list.zip"
Url : http://localhost/pipermail/lazarus/attachments/20021231/ef749109/zip00008.obj
Thanks
Yes
In really i don't use lcl apps very often, i noticed this (under win32) while testing the changes i made three days ago ,so i can't assure it's a new problem or not :-(
Karl Brandt
Attached is a patch that improves TListBox/TComboBox in win32 It implements the…
Karl Brandt wroteBTW: Sometimes the main window(of a lcl app) stops to respond ,being necessary to switch to another window and get back to respond again. Is someone getting the same problem?
Same for me. This is very random and very difficult to reproduce.
Martin Smat.
Attached is a patch that improves TListBox/TComboBox in win32 It implements the…
Attached is a patch that improves TListBox/TComboBox in win32 It implements the properties Sorted, MultiSelect, ExtendedSelect and fix other issues. It also cleans the recreatewnd interface code.
Thx. Applied.
Done.
Fixed for gtk. I hope it also work for win32.
Not yet. Is this an old problem or a new problem?
Mattias