Changeset 83 for oup/current/Main.pas


Ignore:
Timestamp:
Jan 14, 2007, 2:30:12 AM (18 years ago)
Author:
alloc
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • oup/current/Main.pas

    r82 r83  
    111111    procedure ToolbarDockChanged(Sender: TObject);
    112112    procedure menu_loaddbClick(Sender: TObject);
     113    procedure MDITabMouseMove(Sender: TObject; Shift: TShiftState; X,
     114      Y: Integer);
    113115  private
    114116  public
     
    213215
    214216
    215 
    216 
    217 
     217procedure TForm_Main.MDITabMouseMove(Sender: TObject; Shift: TShiftState; X,
     218  Y: Integer);
     219var
     220  pt: TPoint;
     221  tabIndex: Integer;
     222  hint: String;
     223begin
     224  pt.X := X;
     225  pt.Y := Y;
     226  tabIndex := MDITab.GetTabAtPos(pt);
     227
     228  if tabIndex >= 0 then
     229  begin
     230    if MDITab.MDIChildren[tabIndex] is TForm_ToolTemplate then
     231      hint := 'Window: ' + MDITab.MDIChildren[tabIndex].Caption + #13+#10 +
     232            'Selected File: ' +
     233            TForm_ToolTemplate(MDITab.MDIChildren[tabIndex]).SelectedFile.FileName
     234    else
     235      hint := 'Window: ' + MDITab.MDIChildren[tabIndex].Caption;
     236    if hint <> MDITab.Hint then
     237    begin
     238      MDITab.Hint := hint;
     239      MDITab.ShowHint := True;
     240    end;
     241  end
     242  else
     243  begin
     244    MDITab.ShowHint := False;
     245    MDITab.Hint := '';
     246  end;
     247end;
    218248
    219249procedure TForm_Main.MDITabMouseUp(Sender: TObject; Button: TMouseButton;
     
    242272  end;
    243273end;
     274
     275
     276
    244277
    245278procedure TForm_Main.FormClose(Sender: TObject; var Action: TCloseAction);
Note: See TracChangeset for help on using the changeset viewer.