{ Private \90é\8c¾ }
FActionList: TActionList;
FAllList: TList;
+ FToolBarIndex : Integer; // \8f\89\8aú\95\\8e¦\82·\82é\83c\81[\83\8b\83o\81[
procedure CreateListData(ToolBarItem: TToolBarItem);
procedure MoveItem(Offset: Integer);
procedure Sort;
{ Public \90é\8c¾ }
constructor Create(AOwner: TComponent; ActionList: TActionList); reintroduce; overload; virtual;
procedure AddToolBar(ToolBar: TToolBar; ToolType: TGikoToolType);
+ property ToolBarIndex : Integer read FToolBarIndex write FToolBarIndex;
end;
var
implementation
-const
- //\8bæ\90Ø\82è\95¶\8e\9a
- SEPARATOR_TEXT = '- \8bæ\90Ø\82è -';
+//const
+// //\8bæ\90Ø\82è\95¶\8e\9a
+// SEPARATOR_TEXT = '- \8bæ\90Ø\82è -';
{$R *.dfm}
//\83t\83H\81[\83\80\8dì\90¬
procedure TToolBarSettingDialog.FormCreate(Sender: TObject);
+var
+ CenterForm: TCustomForm;
begin
+ CenterForm := TCustomForm(Owner);
+ if Assigned(CenterForm) then begin
+ Left := ((CenterForm.Width - Width) div 2) + CenterForm.Left;
+ Top := ((CenterForm.Height - Height) div 2) + CenterForm.Top;
+ end else begin
+ Left := (Screen.Width - Width) div 2;
+ Top := (Screen.Height - Height) div 2;
+ end;
+
FAllList := TList.Create;
end;
//\95\\8e¦\82µ\82½\82Æ\82«
procedure TToolBarSettingDialog.FormShow(Sender: TObject);
begin
- ToolBarComboBox.ItemIndex := 0;
+ ToolBarComboBox.ItemIndex := FToolBarIndex;
ToolBarComboBoxChange(Self);
AllListViewChange(Sender, nil, ctState);
CurrentListViewChange(Sender, nil, ctState);
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;
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
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);