From b9bd131f2fa0f46f3c86a4acb7d2e354a0eebe18 Mon Sep 17 00:00:00 2001 From: Graeme Geldenhuys Date: Thu, 15 Apr 2010 17:15:33 +0200 Subject: UI Designer: Adds TfpgFilenameEdit to the component palette. --- uidesigner/icons.inc | 105 +++++++++++++++++++++++++++++++++++++ uidesigner/images/editbutton.bmp | Bin 0 -> 1710 bytes uidesigner/images/editfilename.bmp | Bin 0 -> 1710 bytes uidesigner/vfdwidgets.pas | 16 ++++++ 4 files changed, 121 insertions(+) create mode 100644 uidesigner/images/editbutton.bmp create mode 100644 uidesigner/images/editfilename.bmp (limited to 'uidesigner') diff --git a/uidesigner/icons.inc b/uidesigner/icons.inc index 73bfb2ff..40ec9003 100644 --- a/uidesigner/icons.inc +++ b/uidesigner/icons.inc @@ -2904,3 +2904,108 @@ Const 229,255, 0,229,255, 0,229,255, 0,229,255, 0,229,255, 0,229,255, 0,229,255, 0,229,255, 0,229,255, 0,229,255, 0,229,255, 0,229, 255, 0,229, 0); + +Const + stdimg_vfd_editfilename : 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,128,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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,128,128,128,192,192,192,192,192,192, + 192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192, + 192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192, + 192,192,192,192,192, 0, 0, 0, 0, 0, 0,255, 0,255,255, 0,255, + 255, 0,255,255, 0,255,255, 0,255,255, 0,255,128,128,128,192,192, + 192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192, + 192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192, + 192,192,192,188,188,188,192,192,192, 0, 0, 0, 0, 0, 0,255, 0, + 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,128, + 128,128,192,192,192,192,192,192,192,192,192,205,137, 89,205,137, 89, + 205,137, 89,205,137, 89,205,137, 89,205,137, 89,205,137, 89,205,137, + 89,192,192,192,192,192,192,192,192,192,192,192,192, 0, 0, 0, 0, + 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255, + 255, 0,255,128,128,128,192,192,192,192,192,192,192,192,192,205,137, + 89,255,247,240,255,247,240,255,247,240,255,247,240,255,247,240,255, + 247,240,205,137, 89,192,192,192,192,192,192,192,192,192,192,192,192, + 0, 0, 0, 0, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0, + 255,255, 0,255,255, 0,255,128,128,128,192,192,192,192,192,192,192, + 192,192,205,137, 89,255,247,240,255,234,219,255,233,217,255,231,215, + 255,229,210,255,247,241,204,135, 87,192,192,192,192,192,192,192,192, + 192,192,192,192, 0, 0, 0, 0, 0, 0,255, 0,255,255, 0,255,255, + 0,255,255, 0,255,255, 0,255,255, 0,255,128,128,128,192,192,192, + 192,192,192,192,192,192,205,137, 89,255,247,240,253,231,214,253,230, + 212,252,228,208,251,227,203,254,243,232,205,136, 88,192,192,192,192, + 192,192,192,192,192,192,192,192, 0, 0, 0, 0, 0, 0,255, 0,255, + 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,128,128, + 128,192,192,192,192,192,192,192,192,192,205,137, 89,255,247,242,254, + 231,213,253,229,209,250,224,202,249,222,196,253,242,231,205,137, 89, + 192,192,192,194,194,194,194,194,194,192,192,192, 0, 0, 0, 0, 0, + 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, + 0,255,128,128,128,192,192,192,192,192,192,192,192,192,205,137, 89, + 254,247,241,252,228,209,251,226,204,249,221,196,246,215,187,250,239, + 228,205,137, 90,192,192,192,192,192,192,192,192,192,192,192,192, 0, + 0, 0, 0, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255, + 255, 0,255,255, 0,255,128,128,128,192,192,192,192,192,192,192,192, + 192,205,137, 89,254,245,237,251,224,199,249,220,194,245,211,180,254, + 249,243,236,193,147,205,137, 89,190,190,191,192,192,192,192,192,192, + 192,192,192, 0, 0, 0, 0, 0, 0,255, 0,255,255, 0,255,255, 0, + 255,255, 0,255,255, 0,255,255, 0,255,128,128,128,192,192,192,192, + 192,192,193,193,193,205,137, 89,253,243,234,253,243,234,252,242,232, + 250,239,227,250,242,231,205,137, 89,219,223,223,192,192,192,192,192, + 192,195,195,195,192,192,192, 0, 0, 0, 0, 0, 0,255, 0,255,255, + 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,128,128,128, + 192,192,192,192,192,192,192,192,192,205,137, 89,205,137, 89,205,137, + 89,205,137, 89,205,137, 89,205,137, 89,219,223,223,219,223,223,192, + 192,192,192,192,192,197,197,197,192,192,192, 0, 0, 0, 0, 0, 0, + 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0, + 255,128,128,128,192,192,192,192,192,192,192,192,192,192,192,192,192, + 192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192, + 192,192,192,192,192,192,192,192,192,192,192,192,192,192,192, 0, 0, + 0, 0, 0, 0,255, 0,255,128,128,128,255,255,255,255,255,255,255, + 255,255,255,255,255,128,128,128,192,192,192,192,192,192,192,192,192, + 192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192, + 192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192, + 192,192, 0, 0, 0, 0, 0, 0,255, 0,255,128,128,128, 0, 0, 0, + 192,192,192,192,192,192,192,192,192, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255, 0,255,128,128, + 128, 0, 0, 0,255,255,255,255,255,255,255,255,255, 0, 0, 0,255, + 255,255, 0, 0, 0,255, 0, 0,255, 0, 0,255, 0, 0,255, 0, 0, + 255, 0, 0,255, 0, 0,255, 0, 0,255, 0, 0,255, 0, 0,255, 0, + 0,255, 0, 0, 0, 0, 0,255,255,255, 0, 0, 0, 0, 0, 0,255, + 0,255,128,128,128, 0, 0, 0,255,255,255,255,255,255,255,255,255, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0,255, 0,255,128,128,128, 0, 0, 0,255,255,255,255,255, + 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, + 255,255,255,255,255,255,255,255,192,192,192,255,255,255,192,192,192, + 0, 0, 0, 0, 0, 0,192,192,192,128,128,128,192,192,192,255,255, + 255,255, 0,255, 0, 0, 0,255, 0,255,128,128,128, 0, 0, 0,255, + 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, + 255,255,255,255,255,255,255,255,255,255,255,255,192,192,192,255,255, + 255,192,192,192,192,192,192,192,192,192,192,192,192,128,128,128,192, + 192,192,255,255,255,255, 0,255, 0, 0, 0,255, 0,255,128,128,128, + 0, 0, 0,255,255,255,255,255,255,255,255,255,255,255,255,255,255, + 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,192, + 192,192,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, + 255,255,255,192,192,192,255,255,255,255, 0,255, 0, 0, 0,255, 0, + 255,128,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,255, 0,255, 0, + 0, 0,255, 0,255,128,128,128,128,128,128,128,128,128,128,128,128, + 128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, + 128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, + 128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, + 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/editbutton.bmp b/uidesigner/images/editbutton.bmp new file mode 100644 index 00000000..37821a90 Binary files /dev/null and b/uidesigner/images/editbutton.bmp differ diff --git a/uidesigner/images/editfilename.bmp b/uidesigner/images/editfilename.bmp new file mode 100644 index 00000000..5188595b Binary files /dev/null and b/uidesigner/images/editfilename.bmp differ diff --git a/uidesigner/vfdwidgets.pas b/uidesigner/vfdwidgets.pas index 112462f4..7a564327 100644 --- a/uidesigner/vfdwidgets.pas +++ b/uidesigner/vfdwidgets.pas @@ -63,6 +63,7 @@ uses fpg_tab, fpg_popupcalendar, fpg_gauge, + fpg_editbtn, vfdpropeditgrid, vfdmain; @@ -279,6 +280,11 @@ begin sizeof(stdimg_vfd_combodatecheckedit), 0, 0); + fpgImages.AddMaskedBMP( + 'vfd.editfilename', @stdimg_vfd_editfilename, + sizeof(stdimg_vfd_editfilename), + 0, 0); + end; procedure AddWidgetPosProps(wgc: TVFDWidgetClass); @@ -714,6 +720,16 @@ begin //wc.WidgetIconName := 'vfd.editfloat'; //RegisterVFDWidget(wc); + // Filename Edit + wc := TVFDWidgetClass.Create(TfpgFileNameEdit); + wc.NameBase := 'FilenameEdit'; + wc.AddProperty('FileName', TPropertyString, 'Initial starting directory of the dialog'); + wc.AddProperty('InitialDir', TPropertyString, 'Initial starting directory of the dialog'); + wc.AddProperty('Filter', TPropertyString, 'Filename filters used in the dialog'); + wc.AddProperty('TabOrder', TPropertyInteger, 'The tab order'); + wc.WidgetIconName := 'vfd.editfilename'; + RegisterVFDWidget(wc); + // Other - do not delete!!! this should be the last... wc := TVFDWidgetClass.Create(TOtherWidget); wc.NameBase := 'Custom'; -- cgit v1.2.3-70-g09d2