Ignore:
Timestamp:
Oct 15, 2010, 2:13:42 PM (14 years ago)
Author:
george
Message:
  • Fixed: Focus message position in code.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/Transpascal/Forms/UMessagesForm.pas

    r61 r64  
    77uses
    88  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
    9   UCoolDocking;
     9  UCoolDocking, UProject, UCompiler;
    1010
    1111type
     
    1616    CoolDockClient1: TCoolDockClient;
    1717    ListBoxMessages: TListBox;
     18    procedure ListBoxMessagesSelectionChange(Sender: TObject; User: boolean);
    1819  private
    1920    { private declarations }
     
    2930{$R *.lfm}
    3031
     32uses
     33  UMainForm, UCodeForm;
     34
     35{ TMessagesForm }
     36
     37procedure TMessagesForm.ListBoxMessagesSelectionChange(Sender: TObject;
     38  User: boolean);
     39var
     40  ProjectFile: TProjectFile;
     41begin
     42  with MainForm, CodeForm do
     43  if ListBoxMessages.ItemIndex <> -1 then
     44  with TErrorMessage(Compiler.ErrorMessages[ListBoxMessages.ItemIndex]) do begin
     45    ProjectFile := Project.SearchFile(fileName);
     46    if Assigned(ProjectFile) then
     47      SynEditSource.Lines.Assign(ProjectFile.Source);
     48    SynEditSource.CaretXY := Position;
     49    SynEditSource.SetFocus;
     50  end;
     51end;
     52
    3153end.
    3254
Note: See TracChangeset for help on using the changeset viewer.