Ignore:
Timestamp:
Feb 28, 2018, 9:44:51 AM (7 years ago)
Author:
chronos
Message:
  • Added: New Tools action Find duplicates.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormMain.pas

    r15 r16  
    1818    MenuItem1: TMenuItem;
    1919    MenuItem3: TMenuItem;
     20    MenuItem4: TMenuItem;
    2021    MenuItemToolbar: TMenuItem;
    2122    MenuItemView: TMenuItem;
     
    4344    ToolButton4: TToolButton;
    4445    ToolButton5: TToolButton;
     46    ToolButton6: TToolButton;
    4547    procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
    4648    procedure FormCloseQuery(Sender: TObject; var CanClose: boolean);
     
    4951    procedure MenuItemToolbarClick(Sender: TObject);
    5052  private
     53    procedure SetToolbarHints;
    5154    procedure UpdateFormTitle;
    5255  public
     
    8386
    8487procedure TFormMain.FormCreate(Sender: TObject);
    85 var
    86   I: Integer;
    8788begin
    88   for I := 0 to ToolBarFile.ButtonCount - 1 do
    89     ToolBarFile.Buttons[I].Hint := ToolBarFile.Buttons[I].Caption;
    9089end;
    9190
    9291procedure TFormMain.FormShow(Sender: TObject);
    9392begin
     93  SetToolbarHints;
    9494  Core.Initialize;
    9595  Core.ThemeManager1.UseTheme(Self);
     
    103103begin
    104104  UpdateInterface;
     105end;
     106
     107procedure TFormMain.SetToolbarHints;
     108var
     109  I: Integer;
     110  J: Integer;
     111  Control: TControl;
     112begin
     113 for J := 0 to CoolBar1.ControlCount - 1 do begin
     114    Control := CoolBar1.Controls[J];
     115    if Control is TToolBar then begin
     116      for I := 0 to TToolBar(Control).ButtonCount - 1 do begin
     117        TToolBar(Control).Buttons[I].ShowHint := True;
     118        TToolBar(Control).Buttons[I].Hint := TToolBar(Control).Buttons[I].Caption;
     119      end;
     120    end;
     121  end;
    105122end;
    106123
Note: See TracChangeset for help on using the changeset viewer.