Due to all the past complaints of Flicker, Flicker and so on, I believe it was taken too far to alleviate the issue, an issue that most likely was overstated!
If I drag and drop two TButtons into a TControlBar, the control bars do not paint unless you resize the form or the controlbar itself.
no amount of Invalidate, Repaint, Update etc will force it to paint, basically the update is locked because the size hasn't changed.
The following is an example of a simple text program that you can create.
2 TButtons, with Auto Drag set to true and the rest of the code you can see here.
unit Unit1;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, ExtCtrls, StdCtrls;
type
{ TForm1 }
TForm1 = class(TForm)
Button1: TButton;
Button2: TButton;
ControlBar1: TControlBar;
procedure ControlBar1DragDrop(Sender, Source: TObject; X, Y: Integer);
private
public
end;
var
Form1: TForm1;
implementation
{$R *.lfm}
{ TForm1 }
procedure TForm1.ControlBar1DragDrop(Sender, Source: TObject; X, Y: Integer);
begin
(Source as TWinCOntrol).Parent := nil;
COntrolBar1.InsertControl(Source as TWinCOntrol,COntrolBar1.ControlCount);
COntrolBar1.StickControls;//This appears not to work!
Controlbar1.Width := Controlbar1.Width+1; //Must do the following to paint it
ControlBar1.Width := Controlbar1.Width-1; //this is an old BUG for a few controls.
{The Code presented unlocks the update so it will paint}
{This is not restricted to the COntrolBar, it happens elsewhere too}
{Using update, Repaint, Invalidate etc has no effect}
end;
end.
SO my question is, where is the flag I can turn off to force it to update without me doing what you see above?