summaryrefslogtreecommitdiff
path: root/uidesigner
diff options
context:
space:
mode:
authorgraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2008-10-14 09:37:48 +0000
committergraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2008-10-14 09:37:48 +0000
commitc6b377bb5efbb8141450ffdaf40f7808044924aa (patch)
tree1de3987ee734c91a8e4f90d971cd711970ddee9f /uidesigner
parentfafe29dcb23bd43047e05ce9683b274701578b53 (diff)
downloadfpGUI-c6b377bb5efbb8141450ffdaf40f7808044924aa.tar.xz
* UI Designer: New component TfpgTabSheet component on the palette.
* UI Designer: visual editing of PageControl is now possible. Loading and saving of your design also works. It still needs testing and the pagecontrol sometimes draws artifacts.
Diffstat (limited to 'uidesigner')
-rw-r--r--uidesigner/icons.inc106
-rw-r--r--uidesigner/images/tabsheet.bmpbin0 -> 1710 bytes
-rw-r--r--uidesigner/newformdesigner.pas34
-rw-r--r--uidesigner/uidesigner.lpi1
-rw-r--r--uidesigner/vfdwidgets.pas61
5 files changed, 165 insertions, 37 deletions
diff --git a/uidesigner/icons.inc b/uidesigner/icons.inc
index 71d8542b..43b6f65f 100644
--- a/uidesigner/icons.inc
+++ b/uidesigner/icons.inc
@@ -2083,4 +2083,110 @@ Const
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);
+
+Const
+ stdimg_vfd_tabsheet : 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,196, 14, 0, 0,196, 14, 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,
+ 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,255,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, 0, 0, 0,255, 0,255,255,255,255,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,192,192,192,192,192,192,192,192,192,192,192,
+ 192,192,192,192,128,128,128, 0, 0, 0,255, 0,255,255,255,255,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,192,192,192,192,192,192,192,
+ 192,192,192,192,192,192,192,192,128,128,128, 0, 0, 0,255, 0,255,
+ 255,255,255,192,192,192, 0, 0, 0, 4, 4, 4, 67, 67, 67,192,192,
+ 192, 0, 0, 0,192,192,192, 0, 0, 0,192,192,192,110,110,110, 7,
+ 7, 7, 0, 0, 0,192,192,192,110,110,110, 7, 7, 7, 0, 0, 0,
+ 192,192,192, 56, 56, 56, 1, 1, 1,192,192,192,128,128,128, 0, 0,
+ 0,255, 0,255,255,255,255,192,192,192,187,187,187,127,127,127, 3,
+ 3, 3,192,192,192, 0, 0, 0,192,192,192, 0, 0, 0,192,192,192,
+ 14, 14, 14,152,152,152,192,192,192,192,192,192, 14, 14, 14,152,152,
+ 152,192,192,192,192,192,192, 1, 1, 1,186,186,186,192,192,192,128,
+ 128,128, 0, 0, 0,255, 0,255,255,255,255,192,192,192, 29, 29, 29,
+ 37, 37, 37,120,120,120,192,192,192, 0, 0, 0,157,157,157, 5, 5,
+ 5,192,192,192, 14, 14, 14, 0, 0, 0, 2, 2, 2,192,192,192, 14,
+ 14, 14, 0, 0, 0, 2, 2, 2,192,192,192, 0, 0, 0,192,192,192,
+ 192,192,192,128,128,128, 0, 0, 0,255, 0,255,255,255,255,192,192,
+ 192, 66, 66, 66, 4, 4, 4, 0, 0, 0,192,192,192, 0, 0, 0, 55,
+ 55, 55, 65, 65, 65,192,192,192,104,104,104, 7, 7, 7, 74, 74, 74,
+ 192,192,192,104,104,104, 7, 7, 7, 74, 74, 74,192,192,192, 0, 0,
+ 0, 0, 0, 0,192,192,192,128,128,128, 0, 0, 0,255, 0,255,255,
+ 255,255,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,
+ 0, 0, 0,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,192,192,192,192,192,192,128,128,128, 0, 0, 0,
+ 255, 0,255,255,255,255,192,192,192,192,192,192,192,192,192,192,192,
+ 192,192,192,192, 0, 0, 0,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,128,128,
+ 128, 0, 0, 0,255, 0,255,255,255,255,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,192,192,192,192,192,192,192,192,192,192,192,192,192,
+ 192,192,128,128,128, 0, 0, 0,255, 0,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,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,
+ 192,192,192,192,192,128,128,128,255,255,255,255,255,255,255,255,255,
+ 255,255,255,255,255,255,128,128,128, 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,
+ 255,255,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,
+ 192,192,192,192,192,192,192,192,192,128,128,128,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,255,255,192,192,192,192,192,192,192,192,192,192,192,
+ 192,192,192,192,192,192,192,192,192,192,192,192,192,128,128,128,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,255,255,192,192,192,192,192,192,192,
+ 192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,
+ 128,128,128,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,255,255,
+ 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
+ 255,255,255,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,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/tabsheet.bmp b/uidesigner/images/tabsheet.bmp
new file mode 100644
index 00000000..35581815
--- /dev/null
+++ b/uidesigner/images/tabsheet.bmp
Binary files differ
diff --git a/uidesigner/newformdesigner.pas b/uidesigner/newformdesigner.pas
index 34e9c1c9..2d0b099f 100644
--- a/uidesigner/newformdesigner.pas
+++ b/uidesigner/newformdesigner.pas
@@ -193,8 +193,9 @@ begin
begin
Name := 'lblName1';
SetPosition(12, 16, 255, 31);
- Text := 'fpGUI UI Designer';
FontDesc := 'Arial-20';
+ Hint := '';
+ Text := 'fpGUI UI Designer';
end;
lblVersion := TfpgLabel.Create(self);
@@ -202,8 +203,9 @@ begin
begin
Name := 'lblVersion';
SetPosition(150, 56, 175, 16);
- Text := 'Version: %s';
FontDesc := '#Label2';
+ Hint := '';
+ Text := 'Version: %s';
end;
btnName1 := TfpgButton.Create(self);
@@ -214,8 +216,10 @@ begin
Anchors := [anRight,anBottom];
Text := 'Close';
FontDesc := '#Label1';
+ Hint := '';
ImageName := 'stdimg.close';
ModalResult := 1;
+ TabOrder := 2;
end;
lblName3 := TfpgLabel.Create(self);
@@ -223,8 +227,9 @@ begin
begin
Name := 'lblName3';
SetPosition(12, 100, 241, 14);
- Text := 'Written by Graeme Geldenhuys';
FontDesc := 'Arial-9';
+ Hint := '';
+ Text := 'Written by Graeme Geldenhuys';
end;
lblName4 := TfpgHyperlink.Create(self);
@@ -245,8 +250,9 @@ begin
begin
Name := 'lblCompiled';
SetPosition(12, 132, 191, 13);
- Text := 'Compiled on: %s';
FontDesc := 'Arial-8';
+ Hint := '';
+ Text := 'Compiled on: %s';
end;
{@VFD_BODY_END: frmAbout}
@@ -276,17 +282,17 @@ var
begin
{@VFD_BODY_BEGIN: frmMain}
Name := 'frmMain';
- SetPosition(84, 123, 728, 87);
+ SetPosition(84, 123, 754, 87);
WindowTitle := 'frmMain';
- WindowPosition := wpUser;
ShowHint := True;
+ WindowPosition := wpUser;
gINI.ReadFormState(self);
MainMenu := TfpgMenuBar.Create(self);
with MainMenu do
begin
Name := 'MainMenu';
- SetPosition(0, 0, 729, 24);
+ SetPosition(0, 0, 755, 24);
Anchors := [anLeft,anRight,anTop];
end;
@@ -297,10 +303,11 @@ begin
SetPosition(4, 28, 25, 24);
Text := '';
FontDesc := '#Label1';
+ Hint := 'Create a new form';
ImageMargin := -1;
ImageName := 'vfd.newform';
+ TabOrder := 1;
Focusable := False;
- Hint := 'Create a new form';
OnClick := @(maindsgn.OnNewForm);
end;
@@ -311,10 +318,11 @@ begin
SetPosition(30, 28, 25, 24);
Text := '';
FontDesc := '#Label1';
+ Hint := 'Open a file';
ImageMargin := -1;
ImageName := 'stdimg.open';
+ TabOrder := 2;
Focusable := False;
- Hint := 'Open a file';
OnClick := @(maindsgn.OnLoadFile);
end;
@@ -325,10 +333,11 @@ begin
SetPosition(56, 28, 25, 24);
Text := '';
FontDesc := '#Label1';
+ Hint := 'Save the current form design';
ImageMargin := -1;
ImageName := 'stdimg.save';
+ TabOrder := 3;
Focusable := False;
- Hint := 'Save the current form design';
OnClick := @(maindsgn.OnSaveFile);
end;
@@ -336,7 +345,7 @@ begin
with wgpalette do
begin
Name := 'wgpalette';
- SetPosition(116, 28, 613, 28);
+ SetPosition(116, 28, 639, 28);
Anchors := [anLeft,anRight,anTop];
Focusable := False;
end;
@@ -346,8 +355,9 @@ begin
begin
Name := 'chlPalette';
SetPosition(116, 60, 200, 22);
- Items.Add('-');
FontDesc := '#List';
+ Items.Add('-');
+ TabOrder := 5;
FocusItem := 0;
end;
diff --git a/uidesigner/uidesigner.lpi b/uidesigner/uidesigner.lpi
index a509ea53..50fde60d 100644
--- a/uidesigner/uidesigner.lpi
+++ b/uidesigner/uidesigner.lpi
@@ -9,6 +9,7 @@
</Flags>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
+ <IconPath Value="./"/>
<TargetFileExt Value=""/>
<Title Value="uiDesigner"/>
</General>
diff --git a/uidesigner/vfdwidgets.pas b/uidesigner/vfdwidgets.pas
index 385c0c0d..1b20f755 100644
--- a/uidesigner/vfdwidgets.pas
+++ b/uidesigner/vfdwidgets.pas
@@ -80,11 +80,13 @@ type
procedure TVFDPageControlWidgetClass.AddTabSClicked(Sender: TObject);
begin
+ Exit;
FWidget.AppendTabSheet('TabSheet' + IntToStr(FWidget.PageCount));
end;
procedure TVFDPageControlWidgetClass.DeleteTabClicked(Sender: TObject);
begin
+ Exit;
FWidget.RemoveTabSheet(FWidget.ActivePage);
end;
@@ -92,8 +94,10 @@ function TVFDPageControlWidgetClass.CreatePopupMenu(AWidget: TfpgWidget): TfpgPo
begin
FWidget := TfpgPageControl(AWidget);
Result := TfpgPopupMenu.Create(nil);
- Result.AddMenuItem('Add Tab', '', @AddTabSClicked);
- Result.AddMenuItem('Delete Tab', '', @DeleteTabClicked);
+ { TODO : These are disabled for now, because a TabSheet component is used
+ instead of a menu item - for adding tabs. }
+ Result.AddMenuItem('Add Tab', '', @AddTabSClicked).Enabled := False;
+ Result.AddMenuItem('Delete Tab', '', @DeleteTabClicked).Enabled := False;
end;
var
@@ -239,6 +243,11 @@ begin
sizeof(stdimg_vfd_bevel),
0, 0);
+ fpgImages.AddMaskedBMP(
+ 'vfd.tabsheet', @stdimg_vfd_tabsheet,
+ sizeof(stdimg_vfd_tabsheet),
+ 0, 0);
+
end;
procedure AddWidgetPosProps(wgc: TVFDWidgetClass);
@@ -264,7 +273,7 @@ begin
// Label
wc := TVFDWidgetClass.Create(TfpgLabel);
- wc.NameBase := 'lblName';
+ wc.NameBase := 'Label';
wc.AddProperty('Alignment', TPropertyEnum, 'Horizontal text alignment');
wc.AddProperty('FontDesc', TPropertyFontDesc, 'The font used for displaying the label text');
wc.AddProperty('Hint', TPropertyString, '');
@@ -278,7 +287,7 @@ begin
// Edit
wc := TVFDWidgetClass.Create(TfpgEdit);
- wc.NameBase := 'edtName';
+ wc.NameBase := 'Edit';
// wc.AddProperty('Color', TPropertyColor, 'Text color');
wc.AddProperty('TabOrder', TPropertyInteger, 'The tab order');
wc.AddProperty('Text', TPropertyString, 'Initial text');
@@ -290,7 +299,7 @@ begin
// Memo
wc := TVFDWidgetClass.Create(TfpgMemo);
- wc.NameBase := 'memName';
+ wc.NameBase := 'Memo';
wc.AddProperty('Lines', TPropertyStringList, '');
wc.AddProperty('FontDesc', TPropertyFontDesc, 'The font used for displaying the text');
wc.AddProperty('ParentShowHint', TPropertyBoolean, '');
@@ -301,7 +310,7 @@ begin
// Button
wc := TVFDWidgetClass.Create(TfpgButton);
- wc.NameBase := 'btnName';
+ wc.NameBase := 'Button';
wc.AddProperty('Text', TPropertyString, 'Initial text');
wc.AddProperty('AllowAllUp', TPropertyBoolean, '');
wc.AddProperty('Embedded', TPropertyBoolean, 'No focus rectangle will be drawn. eg: Toolbar buttons');
@@ -323,7 +332,7 @@ begin
// CheckBox
wc := TVFDWidgetClass.Create(TfpgCheckBox);
- wc.NameBase := 'cbName';
+ wc.NameBase := 'CheckBox';
wc.AddProperty('Checked', TPropertyBoolean, 'Boolean value');
wc.AddProperty('FontDesc', TPropertyFontDesc, 'The font used for displaying the text');
wc.AddProperty('ParentShowHint', TPropertyBoolean, '');
@@ -335,7 +344,7 @@ begin
// RadioButton
wc := TVFDWidgetClass.Create(TfpgRadioButton);
- wc.NameBase := 'rbName';
+ wc.NameBase := 'RadioButton';
wc.AddProperty('Checked', TPropertyBoolean, 'Boolean value');
wc.AddProperty('FontDesc', TPropertyFontDesc, 'The font used for displaying the text');
wc.AddProperty('GroupIndex', TPropertyInteger, '');
@@ -348,7 +357,7 @@ begin
// ComboBox
wc := TVFDWidgetClass.Create(TfpgComboBox);
- wc.NameBase := 'cbName';
+ wc.NameBase := 'ComboBox';
wc.AddProperty('FontDesc', TPropertyFontDesc, 'The font used for displaying the text');
wc.AddProperty('Items', TPropertyStringList, '');
wc.AddProperty('ParentShowHint', TPropertyBoolean, '');
@@ -359,7 +368,7 @@ begin
// Calendar ComboBox
wc := TVFDWidgetClass.Create(TfpgCalendarCombo);
- wc.NameBase := 'calName';
+ wc.NameBase := 'CalendarCombo';
wc.AddProperty('FontDesc', TPropertyFontDesc, 'The font used for displaying the text');
wc.AddProperty('ParentShowHint', TPropertyBoolean, '');
wc.AddProperty('ShowHint', TPropertyBoolean, '');
@@ -369,7 +378,7 @@ begin
// ListBox
wc := TVFDWidgetClass.Create(TfpgListBox);
- wc.NameBase := 'lstName';
+ wc.NameBase := 'ListBox';
wc.AddProperty('FontDesc', TPropertyFontDesc, 'The font used for displaying the text');
wc.AddProperty('HotTrack', TPropertyBoolean, '');
wc.AddProperty('Items', TPropertyStringList, '');
@@ -382,7 +391,7 @@ begin
// StringGrid
wc := TVFDWidgetClass.Create(TfpgStringGrid);
- wc.NameBase := 'grdName';
+ wc.NameBase := 'Grid';
wc.AddProperty('Columns', TPropertyDBColumns, '');
wc.AddProperty('FontDesc', TPropertyFontDesc, '');
wc.AddProperty('HeaderFontDesc', TPropertyFontDesc, '');
@@ -398,7 +407,7 @@ begin
// Bevel
wc := TVFDWidgetClass.Create(TfpgBevel);
- wc.NameBase := 'bvlName';
+ wc.NameBase := 'Bevel';
wc.AddProperty('BorderStyle', TPropertyEnum, 'Single or Double');
wc.AddProperty('ParentShowHint', TPropertyBoolean, '');
wc.AddProperty('Style', TPropertyEnum, 'Raised or Lower look');
@@ -410,7 +419,7 @@ begin
// Panel
wc := TVFDWidgetClass.Create(TfpgPanel);
- wc.NameBase := 'pnlName';
+ wc.NameBase := 'Panel';
wc.AddProperty('Alignment', TPropertyEnum, 'Text alignment');
wc.AddProperty('Layout', TPropertyEnum, 'Layout of the caption');
wc.AddProperty('LineSpace', TPropertyInteger, 'Line spacing between wrapped caption');
@@ -426,7 +435,7 @@ begin
// ProgressBar
wc := TVFDWidgetClass.Create(TfpgProgressBar);
- wc.NameBase := 'pbName';
+ wc.NameBase := 'ProgressBar';
wc.AddProperty('Min', TPropertyInteger, '');
wc.AddProperty('Max', TPropertyInteger, '');
wc.AddProperty('ParentShowHint', TPropertyBoolean, '');
@@ -438,7 +447,7 @@ begin
// TrackBar
wc := TVFDWidgetClass.Create(TfpgTrackBar);
- wc.NameBase := 'tbName';
+ wc.NameBase := 'TrackBar';
wc.AddProperty('Max', TPropertyInteger, '');
wc.AddProperty('Min', TPropertyInteger, '');
wc.AddProperty('Orientation', TPropertyEnum, '');
@@ -452,7 +461,7 @@ begin
// ListView
wc := TVFDWidgetClass.Create(TfpgListView);
- wc.NameBase := 'lvName';
+ wc.NameBase := 'ListView';
wc.AddProperty('MultiSelect', TPropertyBoolean, '');
wc.AddProperty('ParentShowHint', TPropertyBoolean, '');
wc.AddProperty('ShowHeaders', TPropertyBoolean, '');
@@ -463,7 +472,7 @@ begin
// Treeview
wc := TVFDWidgetClass.Create(TfpgTreeView);
- wc.NameBase := 'tvName';
+ wc.NameBase := 'TreeView';
wc.AddProperty('DefaultColumnWidth',TPropertyInteger, '');
wc.AddProperty('FontDesc',TPropertyFontDesc, '');
wc.AddProperty('ParentShowHint', TPropertyBoolean, '');
@@ -478,7 +487,7 @@ begin
// PageControl
wc := TVFDPageControlWidgetClass.Create(TfpgPageControl);
- wc.NameBase := 'pcName';
+ wc.NameBase := 'PageControl';
wc.AddProperty('ActivePageIndex', TPropertyInteger, '');
wc.AddProperty('FixedTabWidth', TPropertyInteger, '');
wc.AddProperty('ParentShowHint', TPropertyBoolean, '');
@@ -488,18 +497,20 @@ begin
wc.AddProperty('TabOrder', TPropertyInteger, 'The tab order');
wc.AddProperty('TabPosition', TPropertyEnum, '');
wc.WidgetIconName := 'vfd.pagecontrol';
+ wc.Container := True;
RegisterVFDWidget(wc);
// TabSheet
- //wc := TVFDWidgetClass.Create(TfpgTabSheet);
- //wc.NameBase := 'tsName';
- //wc.AddProperty('Text', TPropertyString, 'The tab title');
- //wc.WidgetIconName := 'vfd.tabsheet';
- //RegisterVFDWidget(wc);
+ wc := TVFDWidgetClass.Create(TfpgTabSheet);
+ wc.NameBase := 'TabSheet';
+ wc.AddProperty('Text', TPropertyString, 'The tab title');
+ wc.WidgetIconName := 'vfd.tabsheet';
+ wc.Container := True;
+ RegisterVFDWidget(wc);
// Gauge
wc := TVFDWidgetClass.Create(TfpgGauge);
- wc.NameBase := 'gauName';
+ wc.NameBase := 'Gauge';
wc.AddProperty('Kind', TPropertyEnum, '');
wc.AddProperty('MinValue', TPropertyInteger, '');
wc.AddProperty('MaxValue', TPropertyInteger, '');