From 3bd2c57c88fb4b28fbab0aac7e95590b32ab3862 Mon Sep 17 00:00:00 2001 From: graemeg Date: Tue, 25 Nov 2008 13:42:17 +0000 Subject: * Added some of the missing published properties to TfpgPanel. * Added TfpgGroupBox to UI Designer component palette. --- src/gui/fpg_panel.pas | 8 ++-- uidesigner/icons.inc | 104 +++++++++++++++++++++++++++++++++++++++++ uidesigner/images/groupbox.bmp | Bin 0 -> 1710 bytes uidesigner/vfdwidgets.pas | 27 +++++++++-- 4 files changed, 132 insertions(+), 7 deletions(-) create mode 100644 uidesigner/images/groupbox.bmp diff --git a/src/gui/fpg_panel.pas b/src/gui/fpg_panel.pas index 4fda960e..28e2c722 100644 --- a/src/gui/fpg_panel.pas +++ b/src/gui/fpg_panel.pas @@ -145,16 +145,16 @@ TfpgGroupBox = class(TfpgAbstractPanel) constructor Create(AOwner: TComponent); override; property Font: TfpgFont read FFont; published - property Alignment: TAlignment read GetAlignment write SetAlignment default taCenter; + property Alignment: TAlignment read GetAlignment write SetAlignment default taLeftJustify; property BackgroundColor; property BorderStyle; property FontDesc: string read GetFontDesc write SetFontDesc; - property Style; - property Text: string read GetText write SetText; - property TextColor; property Margin: integer read GetMargin write SetMargin default 2; property ParentShowHint; property ShowHint; + property Style; + property Text: string read GetText write SetText; + property TextColor; property OnClick; property OnDoubleClick; end; diff --git a/uidesigner/icons.inc b/uidesigner/icons.inc index e1b34eba..bad1d570 100644 --- a/uidesigner/icons.inc +++ b/uidesigner/icons.inc @@ -2503,3 +2503,107 @@ 255,255, 0,255,255, 0,255, 0, 0, 0); +Const + stdimg_vfd_groupbox : Array[0..1709] of byte = ( + 66, 77,174, 6, 0, 0, 0, 0, 0, 0, 54, 0, 0, 0, 40, 0, 0, + 0, 23, 0, 0, 0, 23, 0, 0, 0, 1, 0, 24, 0, 0, 0, 0, 0, + 120, 6, 0, 0, 19, 11, 0, 0, 19, 11, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0, + 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, + 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255, + 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0, + 255,255, 0,255, 0, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, + 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255, + 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0, + 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, + 0,255,255, 0,255,255, 0,255, 0, 0, 0,255, 0,255,255, 0,255, + 146,119,119,146,119,119,146,119,119,146,119,119,146,119,119,146,119, + 119,146,119,119,146,119,119,146,119,119,146,119,119,146,119,119,146, + 119,119,146,119,119,146,119,119,146,119,119,146,119,119,146,119,119, + 146,119,119,146,119,119,255, 0,255,255, 0,255, 0, 0, 0,255, 0, + 255,255, 0,255,146,119,119,255,255,255,193,192,194,193,192,194,193, + 192,194,193,192,194,193,192,194,193,192,194,193,192,194,193,192,194, + 193,192,194,193,192,194,193,192,194,193,192,194,193,192,194,193,192, + 194,193,192,194,193,192,194,146,119,119,255, 0,255,255, 0,255, 0, + 0, 0,255, 0,255,255, 0,255,146,119,119,255,255,255,219,223,223, + 219,223,223,219,223,223,219,223,223,219,223,223,219,223,223,219,223, + 223,219,223,223,219,223,223,219,223,223,219,223,223,219,223,223,219, + 223,223,219,223,223,219,223,223,193,192,194,146,119,119,255, 0,255, + 255, 0,255, 0, 0, 0,255, 0,255,255, 0,255,146,119,119,255,255, + 255,219,223,223,219,223,223,219,223,223,219,223,223,219,223,223,219, + 223,223,219,223,223,219,223,223,219,223,223,219,223,223,219,223,223, + 219,223,223,219,223,223,219,223,223,219,223,223,193,192,194,146,119, + 119,255, 0,255,255, 0,255, 0, 0, 0,255, 0,255,255, 0,255,146, + 119,119,255,255,255,219,223,223,219,223,223,219,223,223,219,223,223, + 219,223,223,219,223,223,219,223,223,219,223,223,219,223,223,219,223, + 223,219,223,223,219,223,223,219,223,223,219,223,223,219,223,223,193, + 192,194,146,119,119,255, 0,255,255, 0,255, 0, 0, 0,255, 0,255, + 255, 0,255,146,119,119,255,255,255,219,223,223,219,223,223,219,223, + 223,219,223,223,219,223,223,219,223,223,219,223,223,219,223,223,219, + 223,223,219,223,223,219,223,223,219,223,223,219,223,223,219,223,223, + 219,223,223,193,192,194,146,119,119,255, 0,255,255, 0,255, 0, 0, + 0,255, 0,255,255, 0,255,146,119,119,255,255,255,219,223,223,219, + 223,223,219,223,223,219,223,223,219,223,223,219,223,223,219,223,223, + 219,223,223,219,223,223,219,223,223,219,223,223,219,223,223,219,223, + 223,219,223,223,219,223,223,193,192,194,146,119,119,255, 0,255,255, + 0,255, 0, 0, 0,255, 0,255,255, 0,255,146,119,119,255,255,255, + 219,223,223,219,223,223,219,223,223,219,223,223,219,223,223,219,223, + 223,219,223,223,219,223,223,219,223,223,219,223,223,219,223,223,219, + 223,223,219,223,223,219,223,223,219,223,223,193,192,194,146,119,119, + 255, 0,255,255, 0,255, 0, 0, 0,255, 0,255,255, 0,255,146,119, + 119,255,255,255,219,223,223,219,223,223,219,223,223,219,223,223,219, + 223,223,219,223,223,219,223,223,219,223,223,219,223,223,219,223,223, + 219,223,223,219,223,223,219,223,223,219,223,223,219,223,223,193,192, + 194,146,119,119,255, 0,255,255, 0,255, 0, 0, 0,255, 0,255,255, + 0,255,146,119,119,255,255,255,219,223,223,219,223,223,219,223,223, + 219,223,223,219,223,223,219,223,223,219,223,223,219,223,223,219,223, + 223,219,223,223,219,223,223,219,223,223,219,223,223,219,223,223,219, + 223,223,193,192,194,146,119,119,255, 0,255,255, 0,255, 0, 0, 0, + 255, 0,255,255, 0,255,146,119,119,255,255,255,219,223,223,219,223, + 223,219,223,223,219,223,223,219,223,223,219,223,223,219,223,223,219, + 223,223,219,223,223,219,223,223,219,223,223,219,223,223,219,223,223, + 219,223,223,219,223,223,193,192,194,146,119,119,255, 0,255,255, 0, + 255, 0, 0, 0,255, 0,255,255, 0,255,146,119,119,255,255,255,219, + 223,223,219,223,223,219,223,223,219,223,223,219,223,223,219,223,223, + 219,223,223,219,223,223,219,223,223,219,223,223,219,223,223,219,223, + 223,219,223,223,219,223,223,219,223,223,193,192,194,146,119,119,255, + 0,255,255, 0,255, 0, 0, 0,255, 0,255,255, 0,255,146,119,119, + 255,255,255,219,223,223,219,223,223,219,223,223,219,223,223,219,223, + 223,219,223,223,219,223,223,219,223,223,219,223,223,219,223,223,219, + 223,223,219,223,223,219,223,223,219,223,223,219,223,223,193,192,194, + 146,119,119,255, 0,255,255, 0,255, 0, 0, 0,255, 0,255,255, 0, + 255,146,119,119,255,255,255,219,223,223,219,223,223,219,223,223,219, + 223,223,219,223,223,219,223,223,219,223,223,219,223,223,219,223,223, + 219,223,223,219,223,223,219,223,223,219,223,223,219,223,223,219,223, + 223,193,192,194,146,119,119,255, 0,255,255, 0,255, 0, 0, 0,255, + 0,255,255, 0,255,146,119,119,255,255,255,219,223,223,219,223,223, + 219,223,223,219,223,223,219,223,223,219,223,223,219,223,223,219,223, + 223,219,223,223,219,223,223,219,223,223,219,223,223,219,223,223,219, + 223,223,219,223,223,193,192,194,146,119,119,255, 0,255,255, 0,255, + 0, 0, 0,255, 0,255,255, 0,255,146,119,119,255,255,255,219,223, + 223,219,223,223,219,223,223,219,223,223,219,223,223,219,223,223,219, + 223,223,219,223,223,219,223,223,219,223,223,219,223,223,219,223,223, + 219,223,223,219,223,223,219,223,223,193,192,194,146,119,119,255, 0, + 255,255, 0,255, 0, 0, 0,255, 0,255,255, 0,255,146,119,119,255, + 255,255,255,255,255,221,150,106,221,150,106,221,150,106,221,150,106, + 221,150,106,221,150,106,221,150,106,221,150,106,255,255,255,255,255, + 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,146, + 119,119,255, 0,255,255, 0,255, 0, 0, 0,255, 0,255,255, 0,255, + 146,119,119,146,119,119,146,119,119,221,150,106,221,150,106,221,150, + 106,221,150,106,221,150,106,221,150,106,221,150,106,221,150,106,146, + 119,119,146,119,119,146,119,119,146,119,119,146,119,119,146,119,119, + 146,119,119,146,119,119,255, 0,255,255, 0,255, 0, 0, 0,255, 0, + 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,221,150,106,221, + 150,106,221,150,106,221,150,106,221,150,106,221,150,106,221,150,106, + 221,150,106,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0, + 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255, 0, + 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255, + 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0, + 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, + 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255, + 255, 0,255, 0, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0, + 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, + 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255, + 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0, + 255,255, 0,255,255, 0,255, 0, 0, 0); + diff --git a/uidesigner/images/groupbox.bmp b/uidesigner/images/groupbox.bmp new file mode 100644 index 00000000..c00d77f5 Binary files /dev/null and b/uidesigner/images/groupbox.bmp differ diff --git a/uidesigner/vfdwidgets.pas b/uidesigner/vfdwidgets.pas index 692de9b6..d002e5ac 100644 --- a/uidesigner/vfdwidgets.pas +++ b/uidesigner/vfdwidgets.pas @@ -263,6 +263,11 @@ procedure LoadIcons; sizeof(stdimg_vfd_editcurrency), 0, 0); + fpgImages.AddMaskedBMP( + 'vfd.groupbox', @stdimg_vfd_groupbox, + sizeof(stdimg_vfd_groupbox), + 0, 0); + end; procedure AddWidgetPosProps(wgc: TVFDWidgetClass); @@ -408,7 +413,7 @@ procedure RegisterWidgets; wc := TVFDWidgetClass.Create(TfpgStringGrid); wc.NameBase := 'Grid'; wc.AddProperty('Columns', TPropertyDBColumns, ''); - wc.AddProperty('FontDesc', TPropertyFontDesc, ''); + wc.AddProperty('FontDesc', TPropertyFontDesc, 'The font used for displaying the text'); wc.AddProperty('HeaderFontDesc', TPropertyFontDesc, ''); wc.AddProperty('ParentShowHint', TPropertyBoolean, ''); wc.AddProperty('RowCount', TPropertyInteger, ''); @@ -436,18 +441,34 @@ procedure RegisterWidgets; wc := TVFDWidgetClass.Create(TfpgPanel); wc.NameBase := 'Panel'; wc.AddProperty('Alignment', TPropertyEnum, 'Text alignment'); + wc.AddProperty('FontDesc', TPropertyFontDesc, 'The font used for displaying the text'); wc.AddProperty('Layout', TPropertyEnum, 'Layout of the caption'); wc.AddProperty('LineSpace', TPropertyInteger, 'Line spacing between wrapped caption'); wc.AddProperty('Margin', TPropertyInteger, 'Margin of text'); wc.AddProperty('ParentShowHint', TPropertyBoolean, ''); wc.AddProperty('ShowHint', TPropertyBoolean, ''); - wc.AddProperty('Style', TPropertyEnum, ''); + wc.AddProperty('Style', TPropertyEnum, 'Raised or Lower look'); wc.AddProperty('Text', TPropertyString, 'The panel caption'); wc.AddProperty('WrapText', TPropertyBoolean, 'Should the panel text be wrapped'); wc.WidgetIconName := 'vfd.panel'; wc.Container := True; RegisterVFDWidget(wc); - + + // GroupBox + wc := TVFDWidgetClass.Create(TfpgGroupBox); + wc.NameBase := 'GroupBox'; + wc.AddProperty('Alignment', TPropertyEnum, 'Text alignment'); + wc.AddProperty('BorderStyle', TPropertyEnum, 'Single or Double'); + wc.AddProperty('FontDesc', TPropertyFontDesc, 'The font used for displaying the text'); + wc.AddProperty('Margin', TPropertyInteger, 'Margin of text'); + wc.AddProperty('ShowHint', TPropertyBoolean, ''); + wc.AddProperty('Style', TPropertyEnum, 'Raised or Lower look'); + wc.AddProperty('ParentShowHint', TPropertyBoolean, ''); + wc.AddProperty('Text', TPropertyString, 'The panel caption'); + wc.WidgetIconName := 'vfd.groupbox'; + wc.Container := True; + RegisterVFDWidget(wc); + // ProgressBar wc := TVFDWidgetClass.Create(TfpgProgressBar); wc.NameBase := 'ProgressBar'; -- cgit v1.2.3-54-g00ecf