From bf1aa3d4983f01c0943aa188963a1dc0aa801fbc Mon Sep 17 00:00:00 2001 From: Graeme Geldenhuys Date: Mon, 21 Jul 2014 22:59:15 +0100 Subject: uidesigner: added togglebox widget to the palette bar --- uidesigner/vfdwidgets.pas | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'uidesigner/vfdwidgets.pas') diff --git a/uidesigner/vfdwidgets.pas b/uidesigner/vfdwidgets.pas index 2238e4e5..575ae40a 100644 --- a/uidesigner/vfdwidgets.pas +++ b/uidesigner/vfdwidgets.pas @@ -67,6 +67,7 @@ uses fpg_ColorWheel, fpg_splitter, fpg_hyperlink, + fpg_toggle, vfdpropeditgrid, vfdmain; @@ -325,6 +326,12 @@ begin fpgImages.AddBMP( 'vfd.scrollframe', @stdimg_vfd_scrollframe, sizeof(stdimg_vfd_scrollframe)); + + fpgImages.AddMaskedBMP( + 'vfd.toggle', @stdimg_vfd_toggle, + sizeof(stdimg_vfd_toggle), + 0, 0); + end; procedure AddWidgetPosProps(wgc: TVFDWidgetClass); @@ -985,6 +992,30 @@ begin wc.WidgetIconName := 'vfd.hyperlink'; RegisterVFDWidget(wc); + // ToggleBox + wc := TVFDWidgetClass.Create(TfpgToggle); + wc.NameBase := 'Toggle'; + wc.AddProperty('Align', TPropertyEnum, ''); + wc.AddProperty('Checked', TPropertyBoolean, 'Boolean value'); + wc.AddProperty('CheckedCaption', TPropertyString, 'Initial text'); + wc.AddProperty('CheckedColor', TPropertyColor, ''); + wc.AddProperty('CheckedTextColor', TPropertyColor, ''); + wc.AddProperty('Enabled', TPropertyBoolean, ''); + wc.AddProperty('FontDesc', TPropertyFontDesc, 'The font used for displaying the text'); + wc.AddProperty('Hint', TPropertyString, 'Tooltip hint'); + wc.AddProperty('ParentShowHint', TPropertyBoolean, ''); + wc.AddProperty('ShowHint', TPropertyBoolean, ''); + wc.AddProperty('TabOrder', TPropertyInteger, 'The tab order'); + wc.AddProperty('Text', TPropertyString, 'Initial text'); + wc.AddProperty('TextColor', TPropertyColor, ''); + wc.AddProperty('ToggleWidth', TPropertyInteger, 'Width of toggle button'); + wc.AddProperty('UnCheckedCaption', TPropertyString, 'Initial text'); + wc.AddProperty('UnCheckedColor', TPropertyColor, ''); + wc.AddProperty('UnCheckedTextColor', TPropertyColor, ''); + wc.AddProperty('UseAnimation', TPropertyBoolean, ''); + wc.WidgetIconName := 'vfd.toggle'; + RegisterVFDWidget(wc); + // Other - do not delete!!! this should be the last... wc := TVFDWidgetClass.Create(TOtherWidget); wc.NameBase := 'Custom'; -- cgit v1.2.3-70-g09d2