[lazarus] Patch for win32
pascalive at bol.com.br
Tue Dec 31 14:58:15 EST 2002
Attached is a patch that improves TListBox/TComboBox in win32
It implements the properties Sorted, MultiSelect, ExtendedSelect and fix
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;
if (Index < 0) or (Index >= Items.Count) then
raise Exception.Create('TCustomListBox.GetSelected: index
+' out of bound. Count='+IntToStr(Items.Count));
if HandleAllocated then
>> Result:= (CNSendMessage(LM_GETSEL, Self, @Index) >= 0) -> allways true
Result:=clbiSelected in GetListBoxItemRecord(FItems,Index)^.Flags;
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
Or we must check this in interface?
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 :-)
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 6129 bytes
Url : http://localhost/pipermail/lazarus/attachments/20021231/ef749109/zip00008.obj
More information about the Lazarus