anchordocking: disable header options when no headers shown

git-svn-id: trunk@46608 -
This commit is contained in:
mattias 2014-10-19 18:31:18 +00:00
parent 23d96e97a5
commit b516c61568
2 changed files with 15 additions and 0 deletions

View File

@ -183,6 +183,7 @@ object AnchorDockOptionsFrame: TAnchorDockOptionsFrame
Top = 227
Width = 149
Caption = 'ShowHeaderCheckBox'
OnChange = ShowHeaderCheckBoxChange
ParentShowHint = False
ShowHint = True
TabOrder = 7

View File

@ -71,6 +71,7 @@ type
procedure DragThresholdTrackBarChange(Sender: TObject);
procedure HeaderAlignLeftTrackBarChange(Sender: TObject);
procedure HeaderAlignTopTrackBarChange(Sender: TObject);
procedure ShowHeaderCheckBoxChange(Sender: TObject);
procedure SplitterWidthTrackBarChange(Sender: TObject);
private
FFlags: TAnchorDockOptionsFlags;
@ -141,6 +142,11 @@ begin
UpdateHeaderAlignTopLabel;
end;
procedure TAnchorDockOptionsFrame.ShowHeaderCheckBoxChange(Sender: TObject);
begin
ApplyFlags;
end;
procedure TAnchorDockOptionsFrame.SplitterWidthTrackBarChange(Sender: TObject);
begin
UpdateSplitterWidthLabel;
@ -218,9 +224,17 @@ begin
end;
procedure TAnchorDockOptionsFrame.ApplyFlags;
var
HasHeaders: Boolean;
begin
ShowHeaderCheckBox.Visible:=adofShow_ShowHeader in Flags;
SaveLayoutOnCloseCheckBox.Visible:=adofShow_ShowSaveOnClose in Flags;
HasHeaders:=ShowHeaderCheckBox.Checked;
ShowHeaderCaptionCheckBox.Enabled:=HasHeaders;
HideHeaderCaptionForFloatingCheckBox.Enabled:=HasHeaders;
FlattenHeaders.Enabled:=HasHeaders;
FilledHeaders.Enabled:=HasHeaders;
end;
procedure TAnchorDockOptionsFrame.SaveToMaster;