diff --git a/components/rx/trunk/Demos/ToolPanel/aboutunit.lfm b/components/rx/trunk/Demos/ToolPanel/aboutunit.lfm
index 6455955f7..80df7b414 100644
--- a/components/rx/trunk/Demos/ToolPanel/aboutunit.lfm
+++ b/components/rx/trunk/Demos/ToolPanel/aboutunit.lfm
@@ -7,12 +7,12 @@ object AboutForm: TAboutForm
Caption = 'About...'
ClientHeight = 300
ClientWidth = 400
- LCLVersion = '1.3'
+ Visible = False
object BitBtn1: TBitBtn
- Left = 181
- Height = 37
- Top = 257
- Width = 36
+ Left = 169
+ Height = 30
+ Top = 264
+ Width = 60
Anchors = [akBottom]
AutoSize = True
BorderSpacing.InnerBorder = 2
diff --git a/components/rx/trunk/Demos/ToolPanel/ico/main.ICO b/components/rx/trunk/Demos/ToolPanel/ico/main.ICO
deleted file mode 100644
index 8969d0f11..000000000
Binary files a/components/rx/trunk/Demos/ToolPanel/ico/main.ICO and /dev/null differ
diff --git a/components/rx/trunk/Demos/ToolPanel/project1.lpi b/components/rx/trunk/Demos/ToolPanel/project1.lpi
index e3e84caef..b15001809 100644
--- a/components/rx/trunk/Demos/ToolPanel/project1.lpi
+++ b/components/rx/trunk/Demos/ToolPanel/project1.lpi
@@ -18,8 +18,8 @@
-
-
+
+
@@ -50,7 +50,7 @@
-
+
@@ -63,14 +63,6 @@
-
-
-
-
-
-
-
-
diff --git a/components/rx/trunk/Demos/ToolPanel/project1.lpr b/components/rx/trunk/Demos/ToolPanel/project1.lpr
index e7811ec3d..fa9cb6056 100644
--- a/components/rx/trunk/Demos/ToolPanel/project1.lpr
+++ b/components/rx/trunk/Demos/ToolPanel/project1.lpr
@@ -5,8 +5,7 @@ program project1;
uses
Interfaces, // this includes the LCL widgetset
Forms,
- Unit1,
- AboutUnit;
+ Unit1;
{$R *.res}
diff --git a/components/rx/trunk/Demos/ToolPanel/toolbardemo.cfg b/components/rx/trunk/Demos/ToolPanel/toolbardemo.cfg
index ea321fb0e..a2da97c65 100644
--- a/components/rx/trunk/Demos/ToolPanel/toolbardemo.cfg
+++ b/components/rx/trunk/Demos/ToolPanel/toolbardemo.cfg
@@ -2,6 +2,6 @@
-
+
diff --git a/components/rx/trunk/Demos/ToolPanel/unit1.lfm b/components/rx/trunk/Demos/ToolPanel/unit1.lfm
index 46fa8cb8d..fe729458c 100644
--- a/components/rx/trunk/Demos/ToolPanel/unit1.lfm
+++ b/components/rx/trunk/Demos/ToolPanel/unit1.lfm
@@ -10,7 +10,7 @@ object MainForm: TMainForm
Position = poDesktopCenter
SessionProperties = 'Width;Height;Left;Top'
ShowHint = True
- LCLVersion = '1.3'
+ Visible = False
object ToolPanel1: TToolPanel
Left = 0
Height = 32
@@ -23,7 +23,7 @@ object MainForm: TMainForm
Left = 5
Height = 22
Top = 5
- Width = 59
+ Width = 52
DropDownMenu = PopupMenu1
ShowCaption = True
ButtonStyle = tbrDropDown
@@ -31,16 +31,16 @@ object MainForm: TMainForm
item
Action = actCustom
Visible = True
- Left = 142
+ Left = 123
Height = 22
Top = 5
- Width = 79
+ Width = 70
ShowCaption = True
end
item
Action = actNext
Visible = True
- Left = 279
+ Left = 246
Height = 22
Top = 5
Width = 39
@@ -51,29 +51,29 @@ object MainForm: TMainForm
item
Action = actPrior
Visible = True
- Left = 221
+ Left = 193
Height = 22
Top = 5
- Width = 58
+ Width = 53
DropDownMenu = PopupMenu2
ShowCaption = True
end
item
Action = actExit
Visible = True
- Left = 318
+ Left = 285
Height = 22
Top = 5
- Width = 53
+ Width = 46
ShowCaption = True
end
item
Action = actSysMenu
Visible = True
- Left = 64
+ Left = 57
Height = 22
Top = 5
- Width = 78
+ Width = 66
DropDownMenu = PopupMenu1
ShowCaption = True
ButtonStyle = tbrDropDown
@@ -81,14 +81,14 @@ object MainForm: TMainForm
item
Action = sysAbout
Visible = True
- Left = 371
+ Left = 331
Height = 22
Top = 5
- Width = 67
+ Width = 61
ShowCaption = True
end>
ImageList = ImageList1
- PropertyStorage = XMLPropStorage1
+ PropertyStorage = RxIniPropStorage1
BtnWidth = 23
BtnHeight = 32
ToolBarStyle = tbsWindowsXP
@@ -103,9 +103,9 @@ object MainForm: TMainForm
end
object SpeedButton1: TSpeedButton
Left = 440
- Height = 22
+ Height = 24
Top = 88
- Width = 22
+ Width = 50
AutoSize = True
Caption = 'Test'
Glyph.Data = {
@@ -156,10 +156,10 @@ object MainForm: TMainForm
Margin = 3
end
object BitBtn1: TBitBtn
- Left = 449
- Height = 33
- Top = 134
- Width = 84
+ Left = 440
+ Height = 28
+ Top = 128
+ Width = 86
AutoSize = True
Caption = 'BitBtn1'
Glyph.Data = {
@@ -448,18 +448,21 @@ object MainForm: TMainForm
Caption = 'New'
Hint = 'Action N 1'
ImageIndex = 3
+ ShortCut = 45
end
object actNext: TAction
Caption = 'Next'
Hint = 'Action N 2'
ImageIndex = 2
OnExecute = Action1Execute
+ ShortCut = 16423
end
object actPrior: TAction
Caption = 'Prior'
Hint = 'Prior action'
ImageIndex = 1
OnExecute = Action1Execute
+ ShortCut = 16421
end
object actCustom: TAction
Caption = 'Custom'
@@ -478,6 +481,7 @@ object MainForm: TMainForm
Tag = 4
Caption = 'System'
ImageIndex = 4
+ ShortCut = 16461
end
object sysAbout: TAction
Category = 'System'
@@ -486,12 +490,6 @@ object MainForm: TMainForm
OnExecute = sysAboutExecute
end
end
- object XMLPropStorage1: TXMLPropStorage
- StoredValues = <>
- FileName = 'toolbardemo.cfg'
- left = 216
- top = 88
- end
object PopupMenu1: TPopupMenu
Images = ImageList1
left = 16
@@ -762,4 +760,16 @@ object MainForm: TMainForm
Caption = 'Item 4'
end
end
+ object RxIniPropStorage1: TRxIniPropStorage
+ StoredValues = <>
+ SeparateFiles = True
+ left = 168
+ top = 156
+ end
+ object RxAboutDialog1: TRxAboutDialog
+ Options = [radShowImageLogo]
+ Caption = 'О системе'
+ left = 360
+ top = 72
+ end
end
diff --git a/components/rx/trunk/Demos/ToolPanel/unit1.pas b/components/rx/trunk/Demos/ToolPanel/unit1.pas
index a0049595d..3140c5e8f 100644
--- a/components/rx/trunk/Demos/ToolPanel/unit1.pas
+++ b/components/rx/trunk/Demos/ToolPanel/unit1.pas
@@ -6,7 +6,8 @@ interface
uses
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, ExtCtrls,
- Buttons, StdCtrls, rxtoolbar, ActnList, XMLPropStorage, Menus;
+ Buttons, rxtoolbar, RxIniPropStorage, RxAboutDialog, ActnList,
+ Menus;
type
@@ -23,6 +24,8 @@ type
MenuItem6: TMenuItem;
MenuItem7: TMenuItem;
PopupMenu2: TPopupMenu;
+ RxAboutDialog1: TRxAboutDialog;
+ RxIniPropStorage1: TRxIniPropStorage;
SpeedButton1: TSpeedButton;
sysAbout: TAction;
actNew: TAction;
@@ -40,7 +43,6 @@ type
MenuItem9: TMenuItem;
PopupMenu1: TPopupMenu;
ToolPanel1: TToolPanel;
- XMLPropStorage1: TXMLPropStorage;
procedure Action1Execute(Sender: TObject);
procedure actCustomExecute(Sender: TObject);
procedure actExitExecute(Sender: TObject);
@@ -56,7 +58,6 @@ var
implementation
-uses AboutUnit;
{$R *.lfm}
@@ -80,9 +81,7 @@ end;
procedure TMainForm.sysAboutExecute(Sender: TObject);
begin
- AboutForm:=TAboutForm.Create(Application);
- AboutForm.ShowModal;
- AboutForm.Free;
+ RxAboutDialog1.Execute;
end;
end.
diff --git a/components/rx/trunk/rxtbrsetup.lfm b/components/rx/trunk/rxtbrsetup.lfm
index 12b57c242..47ddf2af0 100644
--- a/components/rx/trunk/rxtbrsetup.lfm
+++ b/components/rx/trunk/rxtbrsetup.lfm
@@ -12,10 +12,10 @@ object ToolPanelSetupForm: TToolPanelSetupForm
OnDestroy = FormDestroy
OnResize = FormResize
Position = poScreenCenter
- LCLVersion = '1.1'
+ Visible = False
object PageControl1: TPageControl
Left = 0
- Height = 433
+ Height = 441
Top = 0
Width = 657
ActivePage = TabSheet1
@@ -24,16 +24,16 @@ object ToolPanelSetupForm: TToolPanelSetupForm
TabOrder = 0
object TabSheet1: TTabSheet
Caption = 'Visible buttons'
- ClientHeight = 400
- ClientWidth = 651
+ ClientHeight = 413
+ ClientWidth = 649
object Label1: TLabel
AnchorSideLeft.Control = BitBtn3
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = TabSheet1
- Left = 349
+ Left = 353
Height = 15
Top = 6
- Width = 102
+ Width = 92
BorderSpacing.Around = 6
Caption = 'Avaliable buttons'
FocusControl = ListBtnAvaliable
@@ -44,7 +44,7 @@ object ToolPanelSetupForm: TToolPanelSetupForm
Left = 8
Height = 15
Top = 6
- Width = 89
+ Width = 78
BorderSpacing.Around = 6
Caption = 'Visible buttons'
FocusControl = ListBtnVisible
@@ -56,10 +56,10 @@ object ToolPanelSetupForm: TToolPanelSetupForm
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = BitBtn6
AnchorSideRight.Side = asrBottom
- Left = 307
+ Left = 301
Height = 30
- Top = 145
- Width = 36
+ Top = 141
+ Width = 46
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Top = 6
BorderSpacing.InnerBorder = 2
@@ -73,10 +73,10 @@ object ToolPanelSetupForm: TToolPanelSetupForm
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = BitBtn6
AnchorSideRight.Side = asrBottom
- Left = 307
- Height = 31
- Top = 108
- Width = 36
+ Left = 301
+ Height = 29
+ Top = 106
+ Width = 46
Anchors = [akTop, akLeft, akRight]
AutoSize = True
BorderSpacing.Top = 6
@@ -91,10 +91,10 @@ object ToolPanelSetupForm: TToolPanelSetupForm
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = BitBtn6
AnchorSideRight.Side = asrBottom
- Left = 307
+ Left = 301
Height = 38
- Top = 64
- Width = 36
+ Top = 62
+ Width = 46
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Top = 6
BorderSpacing.InnerBorder = 2
@@ -106,10 +106,10 @@ object ToolPanelSetupForm: TToolPanelSetupForm
AnchorSideLeft.Control = TabSheet1
AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = ListBtnAvaliable
- Left = 307
- Height = 31
+ Left = 301
+ Height = 29
Top = 27
- Width = 36
+ Width = 46
AutoSize = True
BorderSpacing.InnerBorder = 2
Caption = '>>'
@@ -124,10 +124,10 @@ object ToolPanelSetupForm: TToolPanelSetupForm
AnchorSideRight.Control = TabSheet1
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = cbShowCaption
- Left = 349
- Height = 271
+ Left = 353
+ Height = 287
Top = 27
- Width = 296
+ Width = 290
Anchors = [akTop, akLeft, akRight, akBottom]
BorderSpacing.Around = 6
IntegralHeight = True
@@ -154,9 +154,9 @@ object ToolPanelSetupForm: TToolPanelSetupForm
AnchorSideRight.Control = BitBtn6
AnchorSideBottom.Control = cbShowCaption
Left = 14
- Height = 271
+ Height = 287
Top = 27
- Width = 287
+ Width = 281
Anchors = [akTop, akLeft, akRight, akBottom]
BorderSpacing.Around = 6
ItemHeight = 0
@@ -165,15 +165,14 @@ object ToolPanelSetupForm: TToolPanelSetupForm
ScrollWidth = 285
Style = lbOwnerDrawFixed
TabOrder = 5
- TopIndex = -1
end
object Panel1: TPanel
AnchorSideBottom.Control = TabSheet1
AnchorSideBottom.Side = asrBottom
Left = 3
Height = 62
- Top = 332
- Width = 639
+ Top = 345
+ Width = 637
Alignment = taLeftJustify
Anchors = [akLeft, akRight, akBottom]
BorderSpacing.Around = 6
@@ -185,9 +184,9 @@ object ToolPanelSetupForm: TToolPanelSetupForm
AnchorSideLeft.Control = TabSheet1
AnchorSideBottom.Control = Panel1
Left = 6
- Height = 22
- Top = 304
- Width = 105
+ Height = 19
+ Top = 320
+ Width = 92
Anchors = [akLeft, akBottom]
BorderSpacing.Around = 6
Caption = 'Show caption'
@@ -256,7 +255,7 @@ object ToolPanelSetupForm: TToolPanelSetupForm
ChildSizing.ShrinkVertical = crsScaleChilds
ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 1
- ClientHeight = 78
+ ClientHeight = 75
ClientWidth = 308
Items.Strings = (
'None'
@@ -287,7 +286,7 @@ object ToolPanelSetupForm: TToolPanelSetupForm
ChildSizing.ShrinkVertical = crsScaleChilds
ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 1
- ClientHeight = 78
+ ClientHeight = 75
ClientWidth = 308
Items.Strings = (
'Standart'
@@ -315,8 +314,8 @@ object ToolPanelSetupForm: TToolPanelSetupForm
end
object ButtonPanel1: TButtonPanel
Left = 6
- Height = 42
- Top = 439
+ Height = 34
+ Top = 447
Width = 645
OKButton.Name = 'OKButton'
OKButton.DefaultCaption = True
diff --git a/components/rx/trunk/rxtbrsetup.pas b/components/rx/trunk/rxtbrsetup.pas
index 6d527ed4b..74f6e2478 100644
--- a/components/rx/trunk/rxtbrsetup.pas
+++ b/components/rx/trunk/rxtbrsetup.pas
@@ -89,7 +89,7 @@ var
ToolPanelSetupForm: TToolPanelSetupForm;
implementation
-uses vclutils, ActnList, boxprocs, rxconst;
+uses vclutils, ActnList, boxprocs, rxconst, LCLProc;
{$R *.lfm}
@@ -122,6 +122,7 @@ var
BtnRect:TRect;
Cnv:TCanvas;
C: TColor;
+ S: String;
begin
Cnv:=(Control as TListBox).Canvas;
C:=Cnv.Brush.Color;
@@ -150,7 +151,14 @@ begin
end;
Offset := Offset + 6;
Cnv.Brush.Color:=C;
- Cnv.TextOut(ARect.Left + Offset, (ARect.Top + ARect.Bottom - Cnv.TextHeight('W')) div 2, TCustomAction(P.Action).Caption); { display the text }
+ Cnv.TextOut(ARect.Left + Offset, (ARect.Top + ARect.Bottom - Cnv.TextHeight('Wg')) div 2, TCustomAction(P.Action).Caption); { display the text }
+ if (P.Action is TAction) then
+ if TAction(P.Action).ShortCut <> 0 then
+ begin
+ S:=ShortCutToText(TAction(P.Action).ShortCut);
+ if S<> '' then
+ Cnv.TextOut(ARect.Right - Cnv.TextWidth(S) - 2, (ARect.Top + ARect.Bottom - Cnv.TextHeight('Wg')) div 2, S); { display the shortut caption }
+ end;
end;
end;
end;