Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2003-08

Patch: combobox height

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Micha Nelissen

Hi,

Attached is a patch which fixes the issue that comboboxes have a space below them, for example in the object inspector. Apply in win32 interface please.

Regards,

Micha.

Index: win32callback.inc
=================================================================== RCS file: /FPC/CVS/projects/lazarus/lcl/interfaces/win32/win32callback.inc,v retrieving revision 1.46
diff -u -w -r1.46 win32callback.inc
--- win32callback.inc 9 Aug 2003 16:30:33 -0000 1.46 +++ win32callback.inc 11 Aug 2003 14:43:37 -0000
@@ -502,6 +502,8 @@

     End;
     WM_SIZE:
     Begin

+ if not (OwnerObject is TCustomComboBox) then
+ begin

       With TLMSize(LMessage) Do
       Begin
         Msg := LM_SIZE;

@@ -516,6 +518,7 @@

         if (Windows.GetWindowLong(Window, GWL_STYLE) and WS_HSCROLL)  0 then
           Height := Height - GetSystemMetrics(SM_CYHSCROLL);
       End;

+ end;

     End;
     WM_SYSKEYDOWN:
     Begin

Index: win32listsl.inc
=================================================================== RCS file: /FPC/CVS/projects/lazarus/lcl/interfaces/win32/win32listsl.inc,v retrieving revision 1.10
diff -u -w -r1.10 win32listsl.inc
--- win32listsl.inc 28 Jul 2003 06:42:42 -0000 1.10 +++ win32listsl.inc 11 Aug 2003 14:43:37 -0000
@@ -205,9 +205,6 @@
------------------------------------------------------------------------------} Procedure TWin32ListStringList.Insert(Index: Integer; Const S: String); Begin
- If (FSender.FCompStyle = csComboBox)
- and (GetCount 0) Then
- FSender.Height := (FSender.Height + (FSender.Height Div GetCount));

   If FSorted Then
     SendMessage(FWin32List,FFlagAddString, 0, LPARAM(PChar(S)))
   Else

Reply by email