Changeset 16 for trunk/Forms/UFormMain.pas
- Timestamp:
- Feb 28, 2018, 9:44:51 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormMain.pas
r15 r16 18 18 MenuItem1: TMenuItem; 19 19 MenuItem3: TMenuItem; 20 MenuItem4: TMenuItem; 20 21 MenuItemToolbar: TMenuItem; 21 22 MenuItemView: TMenuItem; … … 43 44 ToolButton4: TToolButton; 44 45 ToolButton5: TToolButton; 46 ToolButton6: TToolButton; 45 47 procedure FormClose(Sender: TObject; var CloseAction: TCloseAction); 46 48 procedure FormCloseQuery(Sender: TObject; var CanClose: boolean); … … 49 51 procedure MenuItemToolbarClick(Sender: TObject); 50 52 private 53 procedure SetToolbarHints; 51 54 procedure UpdateFormTitle; 52 55 public … … 83 86 84 87 procedure TFormMain.FormCreate(Sender: TObject); 85 var86 I: Integer;87 88 begin 88 for I := 0 to ToolBarFile.ButtonCount - 1 do89 ToolBarFile.Buttons[I].Hint := ToolBarFile.Buttons[I].Caption;90 89 end; 91 90 92 91 procedure TFormMain.FormShow(Sender: TObject); 93 92 begin 93 SetToolbarHints; 94 94 Core.Initialize; 95 95 Core.ThemeManager1.UseTheme(Self); … … 103 103 begin 104 104 UpdateInterface; 105 end; 106 107 procedure TFormMain.SetToolbarHints; 108 var 109 I: Integer; 110 J: Integer; 111 Control: TControl; 112 begin 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; 105 122 end; 106 123
Note:
See TracChangeset
for help on using the changeset viewer.