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