mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-12 22:59:28 +02:00
lcl: add csNoDesignVisible to the HiddenRadioButton of TRadioGroup
git-svn-id: trunk@18458 -
This commit is contained in:
parent
acab2e4958
commit
685e4613f7
@ -192,7 +192,7 @@ type
|
||||
csQuadClicks, // control understands mouse quad clicks
|
||||
csFixedWidth,
|
||||
csFixedHeight, // control cannot change it height (for example combobox)
|
||||
csNoDesignVisible,
|
||||
csNoDesignVisible, // control is invisible in the designer
|
||||
csReplicatable,
|
||||
csNoStdEvents,
|
||||
csDisplayDragImage, // display images from dragimagelist during drag operation over control
|
||||
|
@ -696,7 +696,7 @@ type
|
||||
FColumns: integer;
|
||||
FCreatingWnd: boolean;
|
||||
FHiddenButton: TRadioButton;
|
||||
fIgnoreClicks: boolean;
|
||||
FIgnoreClicks: boolean;
|
||||
FItemIndex: integer;
|
||||
FItems: TStrings;
|
||||
FLastClickedItemIndex: integer;
|
||||
|
@ -170,7 +170,7 @@ begin
|
||||
begin
|
||||
Name := 'HiddenRadioButton';
|
||||
Visible := False;
|
||||
ControlStyle := ControlStyle + [csNoDesignSelectable];
|
||||
ControlStyle := ControlStyle + [csNoDesignSelectable, csNoDesignVisible];
|
||||
end;
|
||||
end;
|
||||
|
||||
@ -351,8 +351,8 @@ begin
|
||||
// Therefore there is a hidden button
|
||||
OldItemIndex:=FItemIndex;
|
||||
FItemIndex:=Value;
|
||||
OldIgnoreClicks:=fIgnoreClicks;
|
||||
fIgnoreClicks:=true;
|
||||
OldIgnoreClicks:=FIgnoreClicks;
|
||||
FIgnoreClicks:=true;
|
||||
try
|
||||
if (FItemIndex <> -1) then
|
||||
TRadioButton(FButtonList[FItemIndex]).Checked := true
|
||||
@ -365,7 +365,7 @@ begin
|
||||
end else
|
||||
FHiddenButton.Checked:=false;
|
||||
finally
|
||||
fIgnoreClicks:=OldIgnoreClicks;
|
||||
FIgnoreClicks:=OldIgnoreClicks;
|
||||
end;
|
||||
// this has automatically unset the old button. But they do not recognize
|
||||
// it. Update the states.
|
||||
@ -442,7 +442,7 @@ end;
|
||||
------------------------------------------------------------------------------}
|
||||
procedure TCustomRadioGroup.Clicked(Sender : TObject);
|
||||
Begin
|
||||
if fIgnoreClicks then exit;
|
||||
if FIgnoreClicks then exit;
|
||||
CheckItemIndexChanged;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user