X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=ToolBarSetting.pas;h=1e45aa722fdcd5d8c7264780199b9f639058fdd6;hb=refs%2Fheads%2FBb63;hp=9d3467f58ec021aaac590b697efa0c3a8f553322;hpb=19615e8a00aef9f379056a202f55c57980837dec;p=gikonavigoeson%2Fgikonavi.git diff --git a/ToolBarSetting.pas b/ToolBarSetting.pas index 9d3467f..1e45aa7 100644 --- a/ToolBarSetting.pas +++ b/ToolBarSetting.pas @@ -60,6 +60,7 @@ type { Private éŒ¾ } FActionList: TActionList; FAllList: TList; + FToolBarIndex : Integer; // ‰Šú•\Ž¦‚·‚éƒc[ƒ‹ƒo[ procedure CreateListData(ToolBarItem: TToolBarItem); procedure MoveItem(Offset: Integer); procedure Sort; @@ -68,6 +69,7 @@ type { Public éŒ¾ } constructor Create(AOwner: TComponent; ActionList: TActionList); reintroduce; overload; virtual; procedure AddToolBar(ToolBar: TToolBar; ToolType: TGikoToolType); + property ToolBarIndex : Integer read FToolBarIndex write FToolBarIndex; end; var @@ -126,7 +128,7 @@ end; //•\Ž¦‚µ‚½‚Æ‚« procedure TToolBarSettingDialog.FormShow(Sender: TObject); begin - ToolBarComboBox.ItemIndex := 0; + ToolBarComboBox.ItemIndex := FToolBarIndex; ToolBarComboBoxChange(Self); AllListViewChange(Sender, nil, ctState); CurrentListViewChange(Sender, nil, ctState); @@ -142,7 +144,8 @@ begin ToolBarItem.ToolBar := ToolBar; ToolBarItem.ToolType := ToolType; for i := 0 to ToolBar.ControlCount - 1 do - if ToolBar.Controls[ i ] is TToolButton Then + if ToolBar.Controls[ i ] is TToolButton Then + if not (ToolBar.Controls[ i ].Name = 'SelectComboBoxDummy') Then ToolBarITem.ButtonActionList.Add(ToolBar.Controls[i].Action); ToolBarComboBox.Items.AddObject(ToolBar.Caption, ToolBarItem); end; @@ -174,7 +177,7 @@ begin ToolBarItem := TToolBarItem(ToolBarComboBox.Items.Objects[i]); for j := ToolBarItem.ToolBar.ButtonCount - 1 downto 0 do - ToolBarItem.ToolBar.RemoveControl(ToolBarItem.ToolBar.Buttons[j]); + ToolBarItem.ToolBar.Buttons[j].HostDockSite := nil; for j := 0 to ToolBarItem.ButtonActionList.Count - 1 do begin if ToolBarItem.ButtonActionList[j] = nil then begin @@ -186,6 +189,9 @@ begin end else if TObject(ToolBarItem.ButtonActionList[j]) is TCustomAction then begin ToolButton := TToolButton.Create(ToolBarItem.ToolBar); ToolButton.Action := TCustomAction(ToolBarItem.ButtonActionList[j]); + if ToolButton.ImageIndex = -1 then + ToolButton.ImageIndex := 51; + ToolButton.Left := 10000; SetButtonStyle(ToolBarItem.ButtonActionList[j], ToolButton); ToolBarItem.ToolBar.InsertControl(ToolButton);