IDE: options: scroll tree to category

git-svn-id: trunk@19677 -
This commit is contained in:
mattias 2009-04-28 23:04:31 +00:00
parent d861d852d9
commit 94a5ebbef2
4 changed files with 38 additions and 30 deletions

View File

@ -1,4 +1,4 @@
object IDEOptionsDialog: TIDEOptionsDialog
inherited IDEOptionsDialog: TIDEOptionsDialog
Left = 317
Height = 500
Top = 304
@ -10,16 +10,16 @@ object IDEOptionsDialog: TIDEOptionsDialog
ClientWidth = 700
Constraints.MinHeight = 300
Constraints.MinWidth = 300
OnShow = FormShow
Position = poScreenCenter
LCLVersion = '0.9.27'
object ButtonPanel: TButtonPanel
object ButtonPanel: TButtonPanel[0]
AnchorSideLeft.Control = Owner
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = Owner
Left = 6
Height = 34
Top = 460
Height = 44
Top = 450
Width = 688
BorderSpacing.Left = 6
BorderSpacing.Right = 6
@ -28,19 +28,19 @@ object IDEOptionsDialog: TIDEOptionsDialog
TabOrder = 1
ShowButtons = [pbOK, pbCancel, pbHelp]
end
object CategoryTree: TTreeView
object CategoryTree: TTreeView[1]
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = Owner
AnchorSideBottom.Control = ButtonPanel
Left = 6
Height = 454
Height = 444
Top = 6
Width = 206
Anchors = [akTop, akLeft, akBottom]
BorderSpacing.Left = 6
BorderSpacing.Top = 6
Constraints.MinWidth = 206
DefaultItemHeight = 15
DefaultItemHeight = 19
ReadOnly = True
TabOrder = 0
OnChange = CategoryTreeChange

View File

@ -1,24 +1,24 @@
{ This is an automatically generated lazarus resource file }
LazarusResources.Add('TIDEOptionsDialog','FORMDATA',[
'TPF0'#17'TIDEOptionsDialog'#16'IDEOptionsDialog'#4'Left'#3'='#1#6'Height'#3
+#244#1#3'Top'#3'0'#1#5'Width'#3#188#2#13'ActiveControl'#7#12'CategoryTree'#11
+'BorderIcons'#11#12'biSystemMenu'#0#7'Caption'#6#16'IDEOptionsDialog'#12'Cli'
+'entHeight'#3#244#1#11'ClientWidth'#3#188#2#21'Constraints.MinHeight'#3','#1
+#20'Constraints.MinWidth'#3','#1#8'Position'#7#14'poScreenCenter'#10'LCLVers'
+'ion'#6#6'0.9.27'#0#12'TButtonPanel'#11'ButtonPanel'#22'AnchorSideLeft.Contr'
+'ol'#7#5'Owner'#23'AnchorSideRight.Control'#7#5'Owner'#20'AnchorSideRight.Si'
+'de'#7#9'asrBottom'#24'AnchorSideBottom.Control'#7#5'Owner'#4'Left'#2#6#6'He'
+'ight'#2'"'#3'Top'#3#204#1#5'Width'#3#176#2#18'BorderSpacing.Left'#2#6#19'Bo'
+'rderSpacing.Right'#2#6#20'BorderSpacing.Bottom'#2#6#20'BorderSpacing.Around'
+#2#0#8'TabOrder'#2#1#11'ShowButtons'#11#4'pbOK'#8'pbCancel'#6'pbHelp'#0#0#0#9
+'TTreeView'#12'CategoryTree'#22'AnchorSideLeft.Control'#7#5'Owner'#21'Anchor'
+'SideTop.Control'#7#5'Owner'#24'AnchorSideBottom.Control'#7#11'ButtonPanel'#4
+'Left'#2#6#6'Height'#3#198#1#3'Top'#2#6#5'Width'#3#206#0#7'Anchors'#11#5'akT'
+'op'#6'akLeft'#8'akBottom'#0#18'BorderSpacing.Left'#2#6#17'BorderSpacing.Top'
+#2#6#20'Constraints.MinWidth'#3#206#0#17'DefaultItemHeight'#2#15#8'ReadOnly'
+#9#8'TabOrder'#2#0#8'OnChange'#7#18'CategoryTreeChange'#7'Options'#11#17'tvo'
+'AutoItemHeight'#16'tvoHideSelection'#21'tvoKeepCollapsedNodes'#11'tvoReadOn'
+'ly'#14'tvoShowButtons'#12'tvoShowLines'#11'tvoShowRoot'#11'tvoToolTips'#0#0
+#0#0
'TPF0'#241#17'TIDEOptionsDialog'#16'IDEOptionsDialog'#4'Left'#3'='#1#6'Height'
+#3#244#1#3'Top'#3'0'#1#5'Width'#3#188#2#13'ActiveControl'#7#12'CategoryTree'
+#11'BorderIcons'#11#12'biSystemMenu'#0#7'Caption'#6#16'IDEOptionsDialog'#12
+'ClientHeight'#3#244#1#11'ClientWidth'#3#188#2#21'Constraints.MinHeight'#3','
+#1#20'Constraints.MinWidth'#3','#1#6'OnShow'#7#8'FormShow'#8'Position'#7#14
+'poScreenCenter'#0#242#2#0#12'TButtonPanel'#11'ButtonPanel'#22'AnchorSideLef'
+'t.Control'#7#5'Owner'#23'AnchorSideRight.Control'#7#5'Owner'#20'AnchorSideR'
+'ight.Side'#7#9'asrBottom'#24'AnchorSideBottom.Control'#7#5'Owner'#4'Left'#2
+#6#6'Height'#2','#3'Top'#3#194#1#5'Width'#3#176#2#18'BorderSpacing.Left'#2#6
+#19'BorderSpacing.Right'#2#6#20'BorderSpacing.Bottom'#2#6#20'BorderSpacing.A'
+'round'#2#0#8'TabOrder'#2#1#11'ShowButtons'#11#4'pbOK'#8'pbCancel'#6'pbHelp'
+#0#0#0#242#2#1#9'TTreeView'#12'CategoryTree'#22'AnchorSideLeft.Control'#7#5
+'Owner'#21'AnchorSideTop.Control'#7#5'Owner'#24'AnchorSideBottom.Control'#7
+#11'ButtonPanel'#4'Left'#2#6#6'Height'#3#188#1#3'Top'#2#6#5'Width'#3#206#0#7
+'Anchors'#11#5'akTop'#6'akLeft'#8'akBottom'#0#18'BorderSpacing.Left'#2#6#17
+'BorderSpacing.Top'#2#6#20'Constraints.MinWidth'#3#206#0#17'DefaultItemHeigh'
+'t'#2#19#8'ReadOnly'#9#8'TabOrder'#2#0#8'OnChange'#7#18'CategoryTreeChange'#7
+'Options'#11#17'tvoAutoItemHeight'#16'tvoHideSelection'#21'tvoKeepCollapsedN'
+'odes'#11'tvoReadOnly'#14'tvoShowButtons'#12'tvoShowLines'#11'tvoShowRoot'#11
+'tvoToolTips'#0#0#0#0
]);

View File

@ -41,6 +41,7 @@ type
CategoryTree: TTreeView;
procedure CategoryTreeChange(Sender: TObject; Node: TTreeNode);
procedure FormShow(Sender: TObject);
procedure HelpButtonClick(Sender: TObject);
procedure OkButtonClick(Sender: TObject);
procedure CancelButtonClick(Sender: TObject);
@ -129,6 +130,13 @@ begin
end;
end;
procedure TIDEOptionsDialog.FormShow(Sender: TObject);
begin
// make the category visible in the treeview
if (CategoryTree.Selected<>nil) and (CategoryTree.Selected.Parent<>nil) then
CategoryTree.TopItem:=CategoryTree.Selected.Parent;
end;
procedure TIDEOptionsDialog.OkButtonClick(Sender: TObject);
begin
if not CheckValues then

View File

@ -173,11 +173,11 @@ const
{ iitThumbnail8BitMask } [iitThumbnail32BitData]
);
function GetIcnsIconType(StrIconType: FourCharCode): TicnsIconType;
function GetIcnsIconType(const StrIconType: FourCharCode): TicnsIconType;
implementation
function GetIcnsIconType(StrIconType: FourCharCode): TicnsIconType;
function GetIcnsIconType(const StrIconType: FourCharCode): TicnsIconType;
begin
Result := iitNone;