[lazarus] Patch lcl: customcombobox init
Micha Nelissen
M.Nelissen at student.tue.nl
Wed Aug 27 05:05:25 EDT 2003
Hi,
On initialization, tcustomcombobox always sends it's current itemindex
to the interface. However, if this -1, the control is cleared which is
not what we want. The attached patch rules this case out.
Regards,
Micha.
Index: customcombobox.inc
===================================================================
RCS file: /FPC/CVS/projects/lazarus/lcl/include/customcombobox.inc,v
retrieving revision 1.29
diff -u -r1.29 customcombobox.inc
--- customcombobox.inc 26 Jul 2003 13:26:56 -0000 1.29
+++ customcombobox.inc 27 Aug 2003 09:00:50 -0000
@@ -43,7 +43,8 @@
FItems:= NewStrings;
UpdateSorted;
- CNSendMessage(LM_SETITEMINDEX, Self, Pointer(FItemIndex));
+ if FItemIndex <> -1 then
+ CNSendMessage(LM_SETITEMINDEX, Self, Pointer(FItemIndex));
CNSendMessage(LM_SETPROPERTIES, Self, nil);
end;
More information about the Lazarus
mailing list