View Issue Details

IDProjectCategoryView StatusLast Update
0020359LazarusIDEpublic2012-02-07 01:19
ReporterMartin Friebe Assigned ToLuiz Americo  
Status closedResolutionfixed 
Product Version0.9.31 (SVN) 
Fixed in Version0.9.31 (SVN) 
Summary0020359: Anchor Editor flickers / all controls jump around on every change
Descriptionopen the anchor editor, and hange a spin edit, or tick/untick a checkbox.

All the controls in the anchoreditor are briely painted in completly different positions.

w32 vista
TagsNo tags attached.
Fixed in Revision35188
Attached Files


related to 0011294 resolvedLuiz Americo TComboBox does not honor DropDownCount 



2011-09-29 18:54

reporter   ~0052284

Happens in Windows XP too. But it does not happen in Linux/LCLQt nor in Linux/LCLGtk2.


2011-09-29 23:50

reporter   ~0052287

I have followed it:

 -> TAnchorDesigner.FillComboBoxWithSiblings
  -> TWin32ComboBoxStringList.Assign
   -> TWin32ComboBoxStringList.UpdateComboHeight
    -> TWin32ComboBoxStringList.GetComboHeight
GetComboHeight returns height as if the combo box was always dropped down by adding height of list of items (CB_GETITEMHEIGHT, wParam=0). Then UpdateComboHeight applies the new height.

I don't know if UpdateComboHeight is needed when the list of items is not shown (DroppedDown=False) or why it is needed at all. If it is needed, maybe it should be changed to return height of selection box (wParam=-1) if the list of items is not shown.

For example this disables flickering:

--- lcl/interfaces/win32/ (revision 32560)
+++ lcl/interfaces/win32/ (working copy)
@@ -421,6 +421,12 @@
   Left, Top, Width, Height: integer;
+ if (FSender is TCustomComboBox) and
+ (TCustomComboBox(FSender).Style in [csDropDown, csDropDownList]) and
+ not (TCustomComboBox(FSender).DroppedDown) then
+ begin
+ Exit;
+ end;
   Left := FSender.Left;
   Top := FSender.Top;
   Width := FSender.Width;

Zeljan Rikalo

2012-02-04 12:23

developer   ~0056349

Not blocker, postponed

Martin Friebe

2012-02-04 17:40

manager   ~0056473

When assigning a new list of items to a combobox, then UpdateComboHeight
is called. (similar on other occasions, like list.clear)

lcl\interfaces\win32\ line 370

procedure TWin32ComboBoxStringList.Assign(Source: TPersistent);
     // save text in edit box, assigning strings clears the text
     TWin32WSCustomComboBox.GetText(FSender, EditText);
     inherited Assign(Source);

     // restore text in edit box

(The comment seems misplaced too)

In UpdateComboHeight line 425

procedure TWin32ComboBoxStringList.UpdateComboHeight;
   Left, Top, Width, Height: integer;
   Left := FSender.Left;
   Top := FSender.Top;
   Width := FSender.Width;
   Height := ComboHeight;
   LCLBoundsToWin32Bounds(FSender, Left, Top, Width, Height);
   MoveWindow(FSender.Handle, Left, Top, Width, Height, true);
   LCLControlSizeNeedsUpdate(FSender, true);

   Height := ComboHeight;
That returns the height of the drop down. FSender is the TComboBox. So
the "move" resizes the height of the combobox ?

Only I don't know. This code seems to be intended to modify the
drop-down size (after all the combobox itself doesn't change size, if
the list-entries are changed? So I guess moving this to use
FSender.Height is the wrong fix?

Martin Friebe

2012-02-07 01:19

manager   ~0056605


Issue History

Date Modified Username Field Change
2011-09-28 11:58 Martin Friebe New Issue
2011-09-28 11:58 Martin Friebe LazTarget => -
2011-09-28 11:58 Martin Friebe Widgetset => Win32/Win64
2011-09-28 11:59 Martin Friebe LazTarget - => 0.99.0
2011-09-29 18:54 cobines Note Added: 0052284
2011-09-29 23:50 cobines Note Added: 0052287
2011-10-07 15:53 Vincent Snijders Status new => acknowledged
2011-10-07 15:53 Vincent Snijders Target Version => 0.99.0
2012-02-04 12:23 Zeljan Rikalo LazTarget 0.99.0 => 1.2
2012-02-04 12:23 Zeljan Rikalo Note Added: 0056349
2012-02-04 17:40 Martin Friebe Note Added: 0056473
2012-02-05 12:04 Luiz Americo Status acknowledged => assigned
2012-02-05 12:04 Luiz Americo Assigned To => Luiz Americo
2012-02-06 19:44 Luiz Americo Relationship added related to 0011294
2012-02-06 19:57 Luiz Americo Fixed in Revision => 35188
2012-02-06 19:57 Luiz Americo Status assigned => resolved
2012-02-06 19:57 Luiz Americo Resolution open => fixed
2012-02-07 01:19 Martin Friebe Status resolved => closed
2012-02-07 01:19 Martin Friebe Note Added: 0056605
2012-02-07 01:19 Martin Friebe Fixed in Version => 0.9.31 (SVN)