mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-13 14:39:09 +02:00
fpgui widget set: allow components to be visible at runtime from Graeme (issue #11606)
git-svn-id: trunk@15669 -
This commit is contained in:
parent
e90a4cab8b
commit
b836129186
@ -590,7 +590,6 @@ begin
|
||||
{$IFDEF VerboseFPGUIPrivate}
|
||||
WriteLn('[TFPGUIPrivateButton.CreateWidget]');
|
||||
{$ENDIF}
|
||||
|
||||
Widget := TfpgButton.Create(GetParentContainerWidget());
|
||||
Widget.SetPosition(LCLObject.Left, LCLObject.Top, LCLObject.Width, LCLObject.Height);
|
||||
end;
|
||||
|
@ -86,6 +86,7 @@ type
|
||||
|
||||
class function GetItems(const ACustomComboBox: TCustomComboBox): TStrings; override;
|
||||
// class procedure Sort(const ACustomComboBox: TCustomComboBox; AList: TStrings; IsSorted: boolean); override;
|
||||
class procedure ShowHide(const AWinControl: TWinControl); override;
|
||||
end;
|
||||
|
||||
{ TFpGuiWSComboBox }
|
||||
@ -135,6 +136,7 @@ type
|
||||
class procedure GetPreferredSize(const AWinControl: TWinControl;
|
||||
var PreferredWidth, PreferredHeight: integer); override;}
|
||||
// class procedure SetColor(const AWinControl: TWinControl); override;
|
||||
class procedure ShowHide(const AWinControl: TWinControl); override;
|
||||
end;
|
||||
|
||||
{ TFpGuiWSCustomMemo }
|
||||
@ -153,6 +155,7 @@ type
|
||||
class procedure SetWantReturns(const ACustomMemo: TCustomMemo; const NewWantReturns: boolean); override;
|
||||
class procedure SetWantTabs(const ACustomMemo: TCustomMemo; const NewWantTabs: boolean); override;
|
||||
class procedure SetWordWrap(const ACustomMemo: TCustomMemo; const NewWordWrap: boolean); override;}
|
||||
class procedure ShowHide(const AWinControl: TWinControl); override;
|
||||
end;
|
||||
|
||||
{ TFpGuiWSEdit }
|
||||
@ -187,9 +190,10 @@ type
|
||||
public
|
||||
class function CreateHandle(const AWinControl: TWinControl; const AParams: TCreateParams): TLCLIntfHandle; override;
|
||||
class procedure DestroyHandle(const AWinControl: TWinControl); override;
|
||||
|
||||
class procedure Invalidate(const AWinControl: TWinControl); override;
|
||||
class function GetText(const AWinControl: TWinControl; var AText: String): Boolean; override;
|
||||
class procedure SetText(const AWinControl: TWinControl; const AText: String); override;
|
||||
class procedure ShowHide(const AWinControl: TWinControl); override;
|
||||
end;
|
||||
|
||||
{ TFpGuiWSCustomCheckBox }
|
||||
@ -206,10 +210,9 @@ type
|
||||
class procedure SetShortCut(const ACustomCheckBox: TCustomCheckBox;
|
||||
const OldShortCut, NewShortCut: TShortCut); override;
|
||||
class procedure SetState(const ACustomCheckBox: TCustomCheckBox; const NewState: TCheckBoxState); override;
|
||||
|
||||
class function GetText(const AWinControl: TWinControl; var AText: String): Boolean; override;
|
||||
|
||||
class procedure SetText(const AWinControl: TWinControl; const AText: String); override;
|
||||
class procedure ShowHide(const AWinControl: TWinControl); override;
|
||||
end;
|
||||
|
||||
{ TFpGuiWSCheckBox }
|
||||
@ -245,6 +248,7 @@ type
|
||||
|
||||
class function GetText(const AWinControl: TWinControl; var AText: String): Boolean; override;
|
||||
class procedure SetText(const AWinControl: TWinControl; const AText: String); override;
|
||||
class procedure ShowHide(const AWinControl: TWinControl); override;
|
||||
end;
|
||||
|
||||
{ TFpGuiWSCustomStaticText }
|
||||
@ -346,6 +350,13 @@ begin
|
||||
Result := FComboBox.Items;
|
||||
end;
|
||||
|
||||
class procedure TFpGuiWSCustomComboBox.ShowHide(const AWinControl: TWinControl
|
||||
);
|
||||
begin
|
||||
inherited ShowHide(AWinControl);
|
||||
TFPGUIPrivateComboBox(AWinControl.Handle).Widget.Visible := AWinControl.Visible;
|
||||
end;
|
||||
|
||||
{ TFpGuiWSCustomEdit }
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
@ -359,6 +370,12 @@ begin
|
||||
Result := TLCLIntfHandle(TFPGUIPrivateEdit.Create(AWinControl, AParams));
|
||||
end;
|
||||
|
||||
class procedure TFpGuiWSCustomEdit.ShowHide(const AWinControl: TWinControl);
|
||||
begin
|
||||
inherited ShowHide(AWinControl);
|
||||
TFPGUIPrivateEdit(AWinControl.Handle).Widget.Visible := AWinControl.Visible;
|
||||
end;
|
||||
|
||||
{ TFpGuiWSButton }
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
@ -384,6 +401,12 @@ begin
|
||||
TFPGUIPrivateButton(AWinControl.Handle).SetText(AText);
|
||||
end;
|
||||
|
||||
class procedure TFpGuiWSButton.ShowHide(const AWinControl: TWinControl);
|
||||
begin
|
||||
inherited ShowHide(AWinControl);
|
||||
TFPGUIPrivateButton(AWinControl.Handle).Widget.Visible := AWinControl.Visible;
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
Method: TFpGuiWSButton.CreateHandle
|
||||
Params: None
|
||||
@ -404,6 +427,12 @@ begin
|
||||
AWinControl.Handle := 0;
|
||||
end;
|
||||
|
||||
class procedure TFpGuiWSButton.Invalidate(const AWinControl: TWinControl);
|
||||
begin
|
||||
inherited Invalidate(AWinControl);
|
||||
TFPGUIPrivateButton(AWinControl.Handle).Widget.Invalidate;
|
||||
end;
|
||||
|
||||
{ TFpGuiWSCustomCheckBox }
|
||||
|
||||
class function TFpGuiWSCustomCheckBox.RetrieveState(
|
||||
@ -459,6 +488,13 @@ begin
|
||||
vCheckBox.Text := AText;
|
||||
end;
|
||||
|
||||
class procedure TFpGuiWSCustomCheckBox.ShowHide(const AWinControl: TWinControl
|
||||
);
|
||||
begin
|
||||
inherited ShowHide(AWinControl);
|
||||
TFPGUIPrivateCheckBox(AWinControl.Handle).Widget.Visible := AWinControl.Visible;
|
||||
end;
|
||||
|
||||
class function TFpGuiWSCustomCheckBox.CreateHandle(
|
||||
const AWinControl: TWinControl; const AParams: TCreateParams
|
||||
): TLCLIntfHandle;
|
||||
@ -529,6 +565,12 @@ begin
|
||||
vRadioButton.Text := AText;
|
||||
end;
|
||||
|
||||
class procedure TFpGuiWSRadioButton.ShowHide(const AWinControl: TWinControl);
|
||||
begin
|
||||
inherited ShowHide(AWinControl);
|
||||
TFPGUIPrivateRadioButton(AWinControl.Handle).Widget.Visible := AWinControl.Visible;
|
||||
end;
|
||||
|
||||
class function TFpGuiWSRadioButton.CreateHandle(const AWinControl: TWinControl;
|
||||
const AParams: TCreateParams): TLCLIntfHandle;
|
||||
begin
|
||||
@ -555,6 +597,13 @@ begin
|
||||
Result:=inherited GetStrings(ACustomMemo);
|
||||
end;
|
||||
|
||||
class procedure TFpGuiWSCustomMemo.ShowHide(const AWinControl: TWinControl);
|
||||
begin
|
||||
inherited ShowHide(AWinControl);
|
||||
TFPGUIPrivateMemo(AWinControl.Handle).Widget.Visible := AWinControl.Visible;
|
||||
end;
|
||||
|
||||
|
||||
initialization
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
|
Loading…
Reference in New Issue
Block a user