mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-06 07:20:23 +02:00
improved autosizing of explorermenu example from Darius
git-svn-id: trunk@8479 -
This commit is contained in:
parent
f9b6743de3
commit
79e3ae5aa6
@ -8,51 +8,69 @@ object ExploreIDEMenuForm: TExploreIDEMenuForm
|
||||
Position = poDesktopCenter
|
||||
HorzScrollBar.Page = 467
|
||||
VertScrollBar.Page = 335
|
||||
Left = 453
|
||||
Left = 434
|
||||
Height = 336
|
||||
Top = 450
|
||||
Top = 427
|
||||
Width = 468
|
||||
object LTree: TLabel
|
||||
Align = alTop
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'Menu Tree'
|
||||
Color = clNone
|
||||
ParentColor = False
|
||||
Left = 8
|
||||
Left = 6
|
||||
Height = 13
|
||||
Top = 10
|
||||
Width = 62
|
||||
end
|
||||
object LPAth: TLabel
|
||||
Anchors = [akLeft, akRight, akBottom]
|
||||
AutoSize = False
|
||||
Caption = 'Path of selected item:'
|
||||
Color = clNone
|
||||
Layout = tlCenter
|
||||
ParentColor = False
|
||||
Left = 8
|
||||
Height = 51
|
||||
Top = 280
|
||||
Width = 362
|
||||
Top = 6
|
||||
Width = 456
|
||||
end
|
||||
object TVIDEMenu: TTreeView
|
||||
Align = alTop
|
||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||
DefaultItemHeight = 14
|
||||
TabOrder = 0
|
||||
OnChange = TVIDEMenuChange
|
||||
Left = 8
|
||||
Height = 233
|
||||
Top = 32
|
||||
Width = 449
|
||||
Height = 228
|
||||
Top = 25
|
||||
Width = 468
|
||||
end
|
||||
object BCLose: TButton
|
||||
Anchors = [akRight, akBottom]
|
||||
BorderSpacing.InnerBorder = 2
|
||||
Cancel = True
|
||||
Caption = '&Close'
|
||||
Default = True
|
||||
ModalResult = 1
|
||||
object LPAth: TMemo
|
||||
Align = alTop
|
||||
Anchors = [akBottom]
|
||||
BorderSpacing.Bottom = 6
|
||||
Color = clBtnFace
|
||||
Lines.Strings = (
|
||||
'Path of selected item:'
|
||||
)
|
||||
TabOrder = 1
|
||||
Left = 382
|
||||
Height = 25
|
||||
AnchorSideBottom.Control = BCLose
|
||||
Height = 36
|
||||
Top = 258
|
||||
Width = 468
|
||||
end
|
||||
object Splitter1: TSplitter
|
||||
Align = alTop
|
||||
Cursor = crVSplit
|
||||
Height = 5
|
||||
Width = 468
|
||||
ResizeAnchor = akTop
|
||||
Cursor = crVSplit
|
||||
Height = 5
|
||||
Top = 253
|
||||
Width = 468
|
||||
end
|
||||
object BCLose: TBitBtn
|
||||
Anchors = [akRight, akBottom]
|
||||
BorderSpacing.Bottom = 6
|
||||
BorderSpacing.InnerBorder = 2
|
||||
Caption = '&Close'
|
||||
Kind = bkClose
|
||||
ModalResult = 1
|
||||
NumGlyphs = 0
|
||||
TabOrder = 2
|
||||
AnchorSideBottom.Control = Owner
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 392
|
||||
Height = 30
|
||||
Top = 300
|
||||
Width = 75
|
||||
end
|
||||
|
@ -5,17 +5,22 @@ LazarusResources.Add('TExploreIDEMenuForm','FORMDATA',[
|
||||
+'VIDEMenu'#7'Caption'#6#16'Lazarus IDE menu'#12'ClientHeight'#3'P'#1#11'Clie'
|
||||
+'ntWidth'#3#212#1#8'OnCreate'#7#10'FormCreate'#13'PixelsPerInch'#2'p'#8'Posi'
|
||||
+'tion'#7#15'poDesktopCenter'#18'HorzScrollBar.Page'#3#211#1#18'VertScrollBar'
|
||||
+'.Page'#3'O'#1#4'Left'#3#197#1#6'Height'#3'P'#1#3'Top'#3#194#1#5'Width'#3#212
|
||||
+#1#0#6'TLabel'#5'LTree'#7'Caption'#6#9'Menu Tree'#5'Color'#7#6'clNone'#11'Pa'
|
||||
+'rentColor'#8#4'Left'#2#8#6'Height'#2#13#3'Top'#2#10#5'Width'#2'>'#0#0#6'TLa'
|
||||
+'bel'#5'LPAth'#7'Anchors'#11#6'akLeft'#7'akRight'#8'akBottom'#0#8'AutoSize'#8
|
||||
+#7'Caption'#6#22'Path of selected item:'#5'Color'#7#6'clNone'#6'Layout'#7#8
|
||||
+'tlCenter'#11'ParentColor'#8#4'Left'#2#8#6'Height'#2'3'#3'Top'#3#24#1#5'Widt'
|
||||
+'h'#3'j'#1#0#0#9'TTreeView'#9'TVIDEMenu'#7'Anchors'#11#5'akTop'#6'akLeft'#7
|
||||
+'akRight'#8'akBottom'#0#17'DefaultItemHeight'#2#14#8'TabOrder'#2#0#8'OnChang'
|
||||
+'e'#7#15'TVIDEMenuChange'#4'Left'#2#8#6'Height'#3#233#0#3'Top'#2' '#5'Width'
|
||||
+#3#193#1#0#0#7'TButton'#6'BCLose'#7'Anchors'#11#7'akRight'#8'akBottom'#0#25
|
||||
+'BorderSpacing.InnerBorder'#2#2#6'Cancel'#9#7'Caption'#6#6'&Close'#7'Default'
|
||||
+#9#11'ModalResult'#2#1#8'TabOrder'#2#1#4'Left'#3'~'#1#6'Height'#2#25#3'Top'#3
|
||||
+','#1#5'Width'#2'K'#0#0#0
|
||||
+'.Page'#3'O'#1#4'Left'#3#178#1#6'Height'#3'P'#1#3'Top'#3#171#1#5'Width'#3#212
|
||||
+#1#0#6'TLabel'#5'LTree'#5'Align'#7#5'alTop'#20'BorderSpacing.Around'#2#6#7'C'
|
||||
+'aption'#6#9'Menu Tree'#5'Color'#7#6'clNone'#11'ParentColor'#8#4'Left'#2#6#6
|
||||
+'Height'#2#13#3'Top'#2#6#5'Width'#3#200#1#0#0#9'TTreeView'#9'TVIDEMenu'#5'Al'
|
||||
+'ign'#7#5'alTop'#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#8'akBottom'#0#17
|
||||
+'DefaultItemHeight'#2#14#8'TabOrder'#2#0#8'OnChange'#7#15'TVIDEMenuChange'#6
|
||||
+'Height'#3#228#0#3'Top'#2#25#5'Width'#3#212#1#0#0#5'TMemo'#5'LPAth'#5'Align'
|
||||
+#7#5'alTop'#7'Anchors'#11#8'akBottom'#0#20'BorderSpacing.Bottom'#2#6#5'Color'
|
||||
+#7#9'clBtnFace'#13'Lines.Strings'#1#6#22'Path of selected item:'#0#8'TabOrde'
|
||||
+'r'#2#1#24'AnchorSideBottom.Control'#7#6'BCLose'#6'Height'#2'$'#3'Top'#3#2#1
|
||||
+#5'Width'#3#212#1#0#0#9'TSplitter'#9'Splitter1'#5'Align'#7#5'alTop'#6'Cursor'
|
||||
+#7#8'crVSplit'#6'Height'#2#5#5'Width'#3#212#1#12'ResizeAnchor'#7#5'akTop'#6
|
||||
+'Cursor'#7#8'crVSplit'#6'Height'#2#5#3'Top'#3#253#0#5'Width'#3#212#1#0#0#7'T'
|
||||
+'BitBtn'#6'BCLose'#7'Anchors'#11#7'akRight'#8'akBottom'#0#20'BorderSpacing.B'
|
||||
+'ottom'#2#6#25'BorderSpacing.InnerBorder'#2#2#7'Caption'#6#6'&Close'#4'Kind'
|
||||
+#7#7'bkClose'#11'ModalResult'#2#1#9'NumGlyphs'#2#0#8'TabOrder'#2#2#24'Anchor'
|
||||
+'SideBottom.Control'#7#5'Owner'#21'AnchorSideBottom.Side'#7#9'asrBottom'#4'L'
|
||||
+'eft'#3#136#1#6'Height'#2#30#3'Top'#3','#1#5'Width'#2'K'#0#0#0
|
||||
]);
|
||||
|
@ -22,16 +22,17 @@ interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, ComCtrls,
|
||||
StdCtrls, Buttons, menuintf;
|
||||
StdCtrls, Buttons, menuintf, ExtCtrls;
|
||||
|
||||
type
|
||||
|
||||
{ TExploreIDEMenuForm }
|
||||
|
||||
TExploreIDEMenuForm = class(TForm)
|
||||
BCLose: TButton;
|
||||
LPAth: TLabel;
|
||||
BCLose: TBitBtn;
|
||||
LTree: TLabel;
|
||||
LPAth: TMemo;
|
||||
Splitter1: TSplitter;
|
||||
TVIDEMenu: TTreeView;
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure TVIDEMenuChange(Sender: TObject; Node: TTreeNode);
|
||||
@ -105,7 +106,7 @@ begin
|
||||
N:=TVIDEMenu.Selected;
|
||||
If Assigned(N) and Assigned(N.Data) then
|
||||
With TIDEMenuItem(N.Data) do
|
||||
LPath.Caption:=SSelectedPath+GetPath;
|
||||
LPath.Text:=SSelectedPath+GetPath;
|
||||
end;
|
||||
|
||||
procedure TExploreIDEMenuForm.AddMenuItem(ParentNode : TTreeNode;Item : TIDEMenuItem);
|
||||
|
Loading…
Reference in New Issue
Block a user