mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-07 18:58:04 +02:00
improved taborder dialog (issue #1752) from Darius
git-svn-id: trunk@8799 -
This commit is contained in:
parent
69498e8919
commit
c5e642fa05
@ -1,93 +1,111 @@
|
||||
object TabOrderDialog: TTabOrderDialog
|
||||
ActiveControl = ItemTreeview
|
||||
BorderStyle = bsSizeToolWin
|
||||
Caption = 'TabOrderDialog'
|
||||
ClientHeight = 387
|
||||
ClientWidth = 310
|
||||
OnClose = TabOrderDialogCLOSE
|
||||
OnCreate = TabOrderDialogCREATE
|
||||
PixelsPerInch = 96
|
||||
Position = poScreenCenter
|
||||
HorzScrollBar.Page = 309
|
||||
VertScrollBar.Page = 386
|
||||
Left = 381
|
||||
Height = 387
|
||||
Top = 167
|
||||
Width = 310
|
||||
object UpSpeedbutton: TSpeedButton
|
||||
Anchors = [akTop, akRight]
|
||||
BorderSpacing.OnChange = nil
|
||||
NumGlyphs = 0
|
||||
OnClick = UpSpeedbuttonCLICK
|
||||
ShowHint = True
|
||||
ParentShowHint = False
|
||||
Left = 265
|
||||
Height = 25
|
||||
Hint = 'Move Up'
|
||||
Top = 119
|
||||
Width = 25
|
||||
end
|
||||
object DownSpeedbutton: TSpeedButton
|
||||
Anchors = [akTop, akRight]
|
||||
BorderSpacing.OnChange = nil
|
||||
NumGlyphs = 0
|
||||
OnClick = DownSpeedbuttonCLICK
|
||||
ShowHint = True
|
||||
ParentShowHint = False
|
||||
Left = 265
|
||||
Height = 25
|
||||
Hint = 'Move Down'
|
||||
Top = 165
|
||||
Width = 25
|
||||
end
|
||||
object OkButton: TButton
|
||||
Anchors = [akRight, akBottom]
|
||||
BorderSpacing.OnChange = nil
|
||||
Caption = 'Ok'
|
||||
Default = True
|
||||
OnClick = OkButtonCLICK
|
||||
TabOrder = 0
|
||||
Left = 120
|
||||
Height = 25
|
||||
Top = 350
|
||||
Width = 75
|
||||
end
|
||||
object CancelButton: TButton
|
||||
Anchors = [akRight, akBottom]
|
||||
BorderSpacing.OnChange = nil
|
||||
Cancel = True
|
||||
Caption = 'Cancel'
|
||||
ModalResult = 2
|
||||
TabOrder = 1
|
||||
Left = 216
|
||||
Height = 25
|
||||
Top = 350
|
||||
Width = 75
|
||||
end
|
||||
object ItemTreeview: TTreeView
|
||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||
BorderSpacing.OnChange = nil
|
||||
BorderSpacing.Around = 6
|
||||
DefaultItemHeight = 15
|
||||
HideSelection = False
|
||||
ParentCtl3D = False
|
||||
RightClickSelect = True
|
||||
TabOrder = 2
|
||||
TabOrder = 0
|
||||
Options = [tvoAutoItemHeight, tvoKeepCollapsedNodes, tvoRightClickSelect, tvoShowButtons, tvoShowLines, tvoShowRoot, tvoToolTips]
|
||||
Left = 9
|
||||
Height = 304
|
||||
Top = 8
|
||||
Width = 238
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = Owner
|
||||
AnchorSideRight.Control = ArrowDown
|
||||
AnchorSideBottom.Control = ShowOldValuesCheckbox
|
||||
Left = 6
|
||||
Height = 316
|
||||
Top = 6
|
||||
Width = 267
|
||||
end
|
||||
object ShowOldValuesCheckbox: TCheckBox
|
||||
Anchors = [akLeft, akBottom]
|
||||
BorderSpacing.OnChange = nil
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'ShowOldValuesCheckbox'
|
||||
OnClick = ShowOldValuesCheckboxCLICK
|
||||
TabOrder = 3
|
||||
Left = 9
|
||||
Height = 20
|
||||
Top = 320
|
||||
Width = 171
|
||||
TabOrder = 1
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideBottom.Control = CancelButton
|
||||
Left = 6
|
||||
Height = 13
|
||||
Top = 328
|
||||
Width = 143
|
||||
end
|
||||
object Imagelist1: TImageList
|
||||
left = 56
|
||||
top = 260
|
||||
object OkButton: TBitBtn
|
||||
Anchors = [akRight, akBottom]
|
||||
AutoSize = True
|
||||
BorderSpacing.Around = 6
|
||||
BorderSpacing.InnerBorder = 2
|
||||
Caption = '&OK'
|
||||
Kind = bkOK
|
||||
ModalResult = 1
|
||||
NumGlyphs = 0
|
||||
OnClick = OkButtonCLICK
|
||||
TabOrder = 2
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = Owner
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 236
|
||||
Height = 34
|
||||
Top = 347
|
||||
Width = 68
|
||||
end
|
||||
object CancelButton: TBitBtn
|
||||
Anchors = [akRight, akBottom]
|
||||
AutoSize = True
|
||||
BorderSpacing.Around = 6
|
||||
BorderSpacing.InnerBorder = 2
|
||||
Cancel = True
|
||||
Caption = 'Cancel'
|
||||
Kind = bkCancel
|
||||
ModalResult = 2
|
||||
NumGlyphs = 0
|
||||
TabOrder = 3
|
||||
AnchorSideRight.Control = OkButton
|
||||
AnchorSideBottom.Control = Owner
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 150
|
||||
Height = 34
|
||||
Top = 347
|
||||
Width = 80
|
||||
end
|
||||
object ArrowUp: TArrow
|
||||
Anchors = [akTop, akRight]
|
||||
ArrowType = atUp
|
||||
BorderSpacing.Around = 6
|
||||
OnClick = UpSpeedbuttonCLICK
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 279
|
||||
Height = 25
|
||||
Top = 120
|
||||
Width = 25
|
||||
end
|
||||
object ArrowDown: TArrow
|
||||
Anchors = [akTop, akRight]
|
||||
ArrowType = atDown
|
||||
BorderSpacing.Around = 6
|
||||
OnClick = DownSpeedbuttonCLICK
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 279
|
||||
Height = 25
|
||||
Top = 176
|
||||
Width = 25
|
||||
end
|
||||
end
|
||||
|
@ -1,33 +1,43 @@
|
||||
{ This is an automatically generated lazarus resource file }
|
||||
|
||||
LazarusResources.Add('TTabOrderDialog','FORMDATA',[
|
||||
'TPF0'#15'TTabOrderDialog'#14'TabOrderDialog'#7'Caption'#6#14'TabOrderDialog'
|
||||
+#12'ClientHeight'#3#131#1#11'ClientWidth'#3'6'#1#7'OnClose'#7#19'TabOrderDia'
|
||||
+'logCLOSE'#8'OnCreate'#7#20'TabOrderDialogCREATE'#13'PixelsPerInch'#2'`'#18
|
||||
+'HorzScrollBar.Page'#3'5'#1#18'VertScrollBar.Page'#3#130#1#4'Left'#3'}'#1#6
|
||||
+'Height'#3#131#1#3'Top'#3#167#0#5'Width'#3'6'#1#0#12'TSpeedButton'#13'UpSpee'
|
||||
+'dbutton'#7'Anchors'#11#5'akTop'#7'akRight'#0#22'BorderSpacing.OnChange'#13#9
|
||||
+'NumGlyphs'#2#0#7'OnClick'#7#18'UpSpeedbuttonCLICK'#8'ShowHint'#9#14'ParentS'
|
||||
+'howHint'#8#4'Left'#3#9#1#6'Height'#2#25#4'Hint'#6#7'Move Up'#3'Top'#2'w'#5
|
||||
+'Width'#2#25#0#0#12'TSpeedButton'#15'DownSpeedbutton'#7'Anchors'#11#5'akTop'
|
||||
+#7'akRight'#0#22'BorderSpacing.OnChange'#13#9'NumGlyphs'#2#0#7'OnClick'#7#20
|
||||
+'DownSpeedbuttonCLICK'#8'ShowHint'#9#14'ParentShowHint'#8#4'Left'#3#9#1#6'He'
|
||||
+'ight'#2#25#4'Hint'#6#9'Move Down'#3'Top'#3#165#0#5'Width'#2#25#0#0#7'TButto'
|
||||
+'n'#8'OkButton'#7'Anchors'#11#7'akRight'#8'akBottom'#0#22'BorderSpacing.OnCh'
|
||||
+'ange'#13#7'Caption'#6#2'Ok'#7'Default'#9#7'OnClick'#7#13'OkButtonCLICK'#8'T'
|
||||
+'abOrder'#2#0#4'Left'#2'x'#6'Height'#2#25#3'Top'#3'^'#1#5'Width'#2'K'#0#0#7
|
||||
+'TButton'#12'CancelButton'#7'Anchors'#11#7'akRight'#8'akBottom'#0#22'BorderS'
|
||||
+'pacing.OnChange'#13#6'Cancel'#9#7'Caption'#6#6'Cancel'#11'ModalResult'#2#2#8
|
||||
+'TabOrder'#2#1#4'Left'#3#216#0#6'Height'#2#25#3'Top'#3'^'#1#5'Width'#2'K'#0#0
|
||||
+#9'TTreeView'#12'ItemTreeview'#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#8
|
||||
+'akBottom'#0#22'BorderSpacing.OnChange'#13#17'DefaultItemHeight'#2#15#13'Hid'
|
||||
+'eSelection'#8#11'ParentCtl3D'#8#16'RightClickSelect'#9#8'TabOrder'#2#2#7'Op'
|
||||
+'tions'#11#17'tvoAutoItemHeight'#21'tvoKeepCollapsedNodes'#19'tvoRightClickS'
|
||||
+'elect'#14'tvoShowButtons'#12'tvoShowLines'#11'tvoShowRoot'#11'tvoToolTips'#0
|
||||
+#4'Left'#2#9#6'Height'#3'0'#1#3'Top'#2#8#5'Width'#3#238#0#0#0#9'TCheckBox'#21
|
||||
+'ShowOldValuesCheckbox'#7'Anchors'#11#6'akLeft'#8'akBottom'#0#22'BorderSpaci'
|
||||
+'ng.OnChange'#13#7'Caption'#6#21'ShowOldValuesCheckbox'#7'OnClick'#7#26'Show'
|
||||
+'OldValuesCheckboxCLICK'#8'TabOrder'#2#3#4'Left'#2#9#6'Height'#2#20#3'Top'#3
|
||||
+'@'#1#5'Width'#3#171#0#0#0#10'TImageList'#10'Imagelist1'#4'left'#2'8'#3'top'
|
||||
+#3#4#1#0#0#0
|
||||
'TPF0'#15'TTabOrderDialog'#14'TabOrderDialog'#13'ActiveControl'#7#12'ItemTree'
|
||||
+'view'#11'BorderStyle'#7#13'bsSizeToolWin'#7'Caption'#6#14'TabOrderDialog'#12
|
||||
+'ClientHeight'#3#131#1#11'ClientWidth'#3'6'#1#7'OnClose'#7#19'TabOrderDialog'
|
||||
+'CLOSE'#8'OnCreate'#7#20'TabOrderDialogCREATE'#13'PixelsPerInch'#2'`'#8'Posi'
|
||||
+'tion'#7#14'poScreenCenter'#18'HorzScrollBar.Page'#3'5'#1#18'VertScrollBar.P'
|
||||
+'age'#3#130#1#4'Left'#3'}'#1#6'Height'#3#131#1#3'Top'#3#167#0#5'Width'#3'6'#1
|
||||
+#0#9'TTreeView'#12'ItemTreeview'#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'
|
||||
+#8'akBottom'#0#20'BorderSpacing.Around'#2#6#17'DefaultItemHeight'#2#15#13'Hi'
|
||||
+'deSelection'#8#11'ParentCtl3D'#8#16'RightClickSelect'#9#8'TabOrder'#2#0#7'O'
|
||||
+'ptions'#11#17'tvoAutoItemHeight'#21'tvoKeepCollapsedNodes'#19'tvoRightClick'
|
||||
+'Select'#14'tvoShowButtons'#12'tvoShowLines'#11'tvoShowRoot'#11'tvoToolTips'
|
||||
+#0#22'AnchorSideLeft.Control'#7#5'Owner'#21'AnchorSideTop.Control'#7#5'Owner'
|
||||
+#23'AnchorSideRight.Control'#7#9'ArrowDown'#24'AnchorSideBottom.Control'#7#21
|
||||
+'ShowOldValuesCheckbox'#4'Left'#2#6#6'Height'#3'<'#1#3'Top'#2#6#5'Width'#3#11
|
||||
+#1#0#0#9'TCheckBox'#21'ShowOldValuesCheckbox'#7'Anchors'#11#6'akLeft'#8'akBo'
|
||||
+'ttom'#0#20'BorderSpacing.Around'#2#6#7'Caption'#6#21'ShowOldValuesCheckbox'
|
||||
+#7'OnClick'#7#26'ShowOldValuesCheckboxCLICK'#8'TabOrder'#2#1#22'AnchorSideLe'
|
||||
+'ft.Control'#7#5'Owner'#24'AnchorSideBottom.Control'#7#12'CancelButton'#4'Le'
|
||||
+'ft'#2#6#6'Height'#2#13#3'Top'#3'H'#1#5'Width'#3#143#0#0#0#7'TBitBtn'#8'OkBu'
|
||||
+'tton'#7'Anchors'#11#7'akRight'#8'akBottom'#0#8'AutoSize'#9#20'BorderSpacing'
|
||||
+'.Around'#2#6#25'BorderSpacing.InnerBorder'#2#2#7'Caption'#6#3'&OK'#4'Kind'#7
|
||||
+#4'bkOK'#11'ModalResult'#2#1#9'NumGlyphs'#2#0#7'OnClick'#7#13'OkButtonCLICK'
|
||||
+#8'TabOrder'#2#2#23'AnchorSideRight.Control'#7#5'Owner'#20'AnchorSideRight.S'
|
||||
+'ide'#7#9'asrBottom'#24'AnchorSideBottom.Control'#7#5'Owner'#21'AnchorSideBo'
|
||||
+'ttom.Side'#7#9'asrBottom'#4'Left'#3#236#0#6'Height'#2'"'#3'Top'#3'['#1#5'Wi'
|
||||
+'dth'#2'D'#0#0#7'TBitBtn'#12'CancelButton'#7'Anchors'#11#7'akRight'#8'akBott'
|
||||
+'om'#0#8'AutoSize'#9#20'BorderSpacing.Around'#2#6#25'BorderSpacing.InnerBord'
|
||||
+'er'#2#2#6'Cancel'#9#7'Caption'#6#6'Cancel'#4'Kind'#7#8'bkCancel'#11'ModalRe'
|
||||
+'sult'#2#2#9'NumGlyphs'#2#0#8'TabOrder'#2#3#23'AnchorSideRight.Control'#7#8
|
||||
+'OkButton'#24'AnchorSideBottom.Control'#7#5'Owner'#21'AnchorSideBottom.Side'
|
||||
+#7#9'asrBottom'#4'Left'#3#150#0#6'Height'#2'"'#3'Top'#3'['#1#5'Width'#2'P'#0
|
||||
+#0#6'TArrow'#7'ArrowUp'#7'Anchors'#11#5'akTop'#7'akRight'#0#9'ArrowType'#7#4
|
||||
+'atUp'#20'BorderSpacing.Around'#2#6#7'OnClick'#7#18'UpSpeedbuttonCLICK'#23'A'
|
||||
+'nchorSideRight.Control'#7#5'Owner'#20'AnchorSideRight.Side'#7#9'asrBottom'#4
|
||||
+'Left'#3#23#1#6'Height'#2#25#3'Top'#2'x'#5'Width'#2#25#0#0#6'TArrow'#9'Arrow'
|
||||
+'Down'#7'Anchors'#11#5'akTop'#7'akRight'#0#9'ArrowType'#7#6'atDown'#20'Borde'
|
||||
+'rSpacing.Around'#2#6#7'OnClick'#7#20'DownSpeedbuttonCLICK'#23'AnchorSideRig'
|
||||
+'ht.Control'#7#5'Owner'#20'AnchorSideRight.Side'#7#9'asrBottom'#4'Left'#3#23
|
||||
+#1#6'Height'#2#25#3'Top'#3#176#0#5'Width'#2#25#0#0#0
|
||||
]);
|
||||
|
@ -1,3 +1,30 @@
|
||||
{
|
||||
/***************************************************************************
|
||||
taborderdlg.pas
|
||||
---------------
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
***************************************************************************
|
||||
* *
|
||||
* This source is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This code is distributed in the hope that it will be useful, but *
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||
* General Public License for more details. *
|
||||
* *
|
||||
* A copy of the GNU General Public License is available on the World *
|
||||
* Wide Web at <http://www.gnu.org/copyleft/gpl.html>. You can also *
|
||||
* obtain it by writing to the Free Software Foundation, *
|
||||
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
* *
|
||||
***************************************************************************
|
||||
}
|
||||
|
||||
unit TabOrderDlg;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
@ -6,17 +33,19 @@ interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, LResources, LCLProc, Forms, Controls, Graphics, Dialogs,
|
||||
Buttons, ComCtrls, StdCtrls;
|
||||
Buttons, ComCtrls, StdCtrls, Arrow, LazarusIDEStrConsts;
|
||||
|
||||
type
|
||||
|
||||
{ TTabOrderDialog }
|
||||
|
||||
TTabOrderDialog = class(TForm)
|
||||
ArrowUp: TArrow;
|
||||
ArrowDown: TArrow;
|
||||
CancelButton: TBitBtn;
|
||||
OkButton: TBitBtn;
|
||||
ShowOldValuesCheckbox: TCHECKBOX;
|
||||
Imagelist1: TIMAGELIST;
|
||||
OkButton: TBUTTON;
|
||||
CancelButton: TBUTTON;
|
||||
ItemTreeview: TTREEVIEW;
|
||||
UpSpeedbutton: TSPEEDBUTTON;
|
||||
DownSpeedbutton: TSPEEDBUTTON;
|
||||
procedure DownSpeedbuttonCLICK(Sender: TObject);
|
||||
procedure OkButtonCLICK(Sender: TObject);
|
||||
procedure ShowOldValuesCheckboxCLICK(Sender: TObject);
|
||||
@ -54,13 +83,7 @@ end;
|
||||
|
||||
procedure TTabOrderDialog.TabOrderDialogCREATE(Sender: TObject);
|
||||
begin
|
||||
OkButton.Caption:='Ok';
|
||||
CancelButton.Caption:='Cancel';
|
||||
ShowOldValuesCheckbox.Caption:='Show old tab order';
|
||||
UpSpeedbutton.Glyph:=TPixmap.Create;
|
||||
UpSpeedbutton.Glyph.LoadFromLazarusResource('uparrow');
|
||||
DownSpeedbutton.Glyph:=TPixmap.Create;
|
||||
DownSpeedbutton.Glyph.LoadFromLazarusResource('downarrow');
|
||||
ShowOldValuesCheckbox.Caption:=lisShowOldTabOrder;
|
||||
end;
|
||||
|
||||
procedure TTabOrderDialog.UpSpeedbuttonCLICK(Sender: TObject);
|
||||
@ -111,7 +134,7 @@ begin
|
||||
if FLookupRoot=AValue then exit;
|
||||
FLookupRoot:=AValue;
|
||||
if FLookupRoot<>nil then begin
|
||||
Caption:='Tab Order of '+FLookupRoot.Name;
|
||||
Caption:=lisTabOrderOf + ' ' + FLookupRoot.Name;
|
||||
end;
|
||||
FillTree;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user