Linden
The example you were suggesting is not exactly the porblem I am having.
Let say, you have a TPanel Panel1. Inside of it, you place a text TLabel Label and a button TButton Button.
Panel1 has the AutoSize set to True,
The Panel has the default anchor Top Right. No other alignment.
Label has the alignment to Left and is the first one in the panel.
Button has also the alignment to Left.
By default Label and Button are visible.
When you click on the button, the label Visible property is toggle between True and False. Which should resize the panel as the number of element visible decrease/increase.
This has been working for 1 year now under XE4.
With XE6, the panel does not resize. It remains at the original size where both the label and the button are visible.
Panel1: TPanel;
Label1: TLabel;
Button1: TButton;
procedure TfrmSLMain.Button1Click(Sender: TObject);
begin
label1.Visible := not label1.Visible;
end;
The DFM content is:
object Panel1: TPanel
Left = 359
Top = 17
Width = 112
Height = 73
AutoSize = True
Caption = 'Panel1'
TabOrder = 2
object Label1: TLabel
Left = 1
Top = 1
Width = 35
Height = 71
Align = alLeft
Caption = 'Label1 '
ExplicitHeight = 13
end
object Button1: TButton
Left = 36
Top = 1
Width = 75
Height = 71
Align = alLeft
Caption = 'Button1'
TabOrder = 0
OnClick = Button1Click
ExplicitLeft = 0
ExplicitTop = 29
ExplicitHeight = 25
end
end
Edited by: Marco Constant on Jun 15, 2014 12:11 PM
Connect with Us