* May 18th, 2005: Starting to develop AMXX-Edit v2 as a kind of open source

This commit is contained in:
Christian Hammacher
2005-05-18 20:53:06 +00:00
parent 3642cedd2b
commit dd6abc5487
19 changed files with 9817 additions and 0 deletions

View File

@ -0,0 +1,48 @@
unit UnitfrmGoToLine;
interface
uses
SysUtils, Windows, Messages, Classes, Graphics, Controls,
StdCtrls, ExtCtrls, Forms, TFlatSpeedButtonUnit, TFlatEditUnit;
type
TfrmGoToLine = class(TForm)
lblInfo: TLabel;
txtLine: TFlatEdit;
cmdOK: TFlatSpeedButton;
cmdCancel: TFlatSpeedButton;
procedure cmdOKClick(Sender: TObject);
procedure txtLineKeyPress(Sender: TObject; var Key: Char);
end;
var
frmGoToLine: TfrmGoToLine;
implementation
uses UnitfrmMain;
{$R *.DFM}
procedure TfrmGoToLine.cmdOKClick(Sender: TObject);
begin
try
if (StrToInt(txtLine.Text) < 0) or (StrToInt(txtLine.Text) > frmMain.sciEditor.Lines.Count) then
raise Exception.Create('Invalid Line')
else
ModalResult := mrOK;
except
MessageBox(Handle, 'Invalid value. Check the entered line and press OK again.', 'Error', MB_ICONERROR);
end;
end;
procedure TfrmGoToLine.txtLineKeyPress(Sender: TObject; var Key: Char);
begin
if Key = #13 then begin
cmdOk.Click;
Key := #0;
end;
end;
end.