[lazarus] Patch: combobox (and other controls) top position

Micha Nelissen M.Nelissen at student.tue.nl
Mon Aug 11 14:18:40 EDT 2003


Micha Nelissen wrote:

> Hi,
> 
> Attached is a patch to fix top position of controls (especially 
> TComboBox) in TGroupBoxes.

And a patch for the patch: forgot that Sender could nil, so add a check 
for that one. See attached patch.

Regards,

Micha.


--- win32proc.old.inc	2003-08-11 20:49:01.000000000 +0200
+++ win32proc.inc	2003-08-11 20:47:11.000000000 +0200
@@ -715,6 +715,7 @@
   DC: HDC;
   Handle: HWND;
 Begin
+  if Sender = nil then exit;
   If (TControl(Sender).Parent Is TCustomGroupBox) Then
   Begin
     Handle := TControl(Sender).Parent.Handle;
@@ -731,6 +732,7 @@
   DC: HDC;
   Handle: HWND;
 Begin
+  if Sender = nil then exit;
   // check for groupbox client pos
   If (TControl(Sender).Parent Is TCustomGroupBox) Then
   Begin





More information about the Lazarus mailing list