lcl: add csNoDesignVisible to the HiddenRadioButton of TRadioGroup

git-svn-id: trunk@18458 -
This commit is contained in:
paul 2009-01-27 04:18:58 +00:00
parent acab2e4958
commit 685e4613f7
3 changed files with 7 additions and 7 deletions

View File

@ -192,7 +192,7 @@ type
csQuadClicks, // control understands mouse quad clicks csQuadClicks, // control understands mouse quad clicks
csFixedWidth, csFixedWidth,
csFixedHeight, // control cannot change it height (for example combobox) csFixedHeight, // control cannot change it height (for example combobox)
csNoDesignVisible, csNoDesignVisible, // control is invisible in the designer
csReplicatable, csReplicatable,
csNoStdEvents, csNoStdEvents,
csDisplayDragImage, // display images from dragimagelist during drag operation over control csDisplayDragImage, // display images from dragimagelist during drag operation over control

View File

@ -696,7 +696,7 @@ type
FColumns: integer; FColumns: integer;
FCreatingWnd: boolean; FCreatingWnd: boolean;
FHiddenButton: TRadioButton; FHiddenButton: TRadioButton;
fIgnoreClicks: boolean; FIgnoreClicks: boolean;
FItemIndex: integer; FItemIndex: integer;
FItems: TStrings; FItems: TStrings;
FLastClickedItemIndex: integer; FLastClickedItemIndex: integer;

View File

@ -170,7 +170,7 @@ begin
begin begin
Name := 'HiddenRadioButton'; Name := 'HiddenRadioButton';
Visible := False; Visible := False;
ControlStyle := ControlStyle + [csNoDesignSelectable]; ControlStyle := ControlStyle + [csNoDesignSelectable, csNoDesignVisible];
end; end;
end; end;
@ -351,8 +351,8 @@ begin
// Therefore there is a hidden button // Therefore there is a hidden button
OldItemIndex:=FItemIndex; OldItemIndex:=FItemIndex;
FItemIndex:=Value; FItemIndex:=Value;
OldIgnoreClicks:=fIgnoreClicks; OldIgnoreClicks:=FIgnoreClicks;
fIgnoreClicks:=true; FIgnoreClicks:=true;
try try
if (FItemIndex <> -1) then if (FItemIndex <> -1) then
TRadioButton(FButtonList[FItemIndex]).Checked := true TRadioButton(FButtonList[FItemIndex]).Checked := true
@ -365,7 +365,7 @@ begin
end else end else
FHiddenButton.Checked:=false; FHiddenButton.Checked:=false;
finally finally
fIgnoreClicks:=OldIgnoreClicks; FIgnoreClicks:=OldIgnoreClicks;
end; end;
// this has automatically unset the old button. But they do not recognize // this has automatically unset the old button. But they do not recognize
// it. Update the states. // it. Update the states.
@ -442,7 +442,7 @@ end;
------------------------------------------------------------------------------} ------------------------------------------------------------------------------}
procedure TCustomRadioGroup.Clicked(Sender : TObject); procedure TCustomRadioGroup.Clicked(Sender : TObject);
Begin Begin
if fIgnoreClicks then exit; if FIgnoreClicks then exit;
CheckItemIndexChanged; CheckItemIndexChanged;
end; end;