this feature is just for sawce (updated go to line dialog)

This commit is contained in:
Christian Hammacher 2006-09-30 19:03:49 +00:00
parent 461e7de151
commit 9740f6469d
3 changed files with 10 additions and 11 deletions

Binary file not shown.

Binary file not shown.

View File

@ -9,13 +9,14 @@ uses
type
TfrmGoToLine = class(TForm)
pnlBG: TSpTBXPanel;
lblCaption: TLabel;
txtGoToLine: TSpTBXEdit;
cmdOK: TSpTBXButton;
cmdCancel: TSpTBXButton;
procedure txtGoToLineChange(Sender: TObject);
cmdOK: TSpTBXButton;
txtGoToLine: TSpTBXEdit;
procedure txtGoToLineKeyPress(Sender: TObject; var Key: Char);
procedure FormShow(Sender: TObject);
procedure txtGoToLineChange(Sender: TObject);
end;
var
@ -27,14 +28,6 @@ uses UnitMainTools;
{$R *.DFM}
procedure TfrmGoToLine.txtGoToLineChange(Sender: TObject);
begin
if not IsNumeric(txtGoToLine.Text) then
txtGoToLine.Text := '1'
else if txtGoToLine.Text = '0' then
txtGoToLine.Text := '1';
end;
procedure TfrmGoToLine.txtGoToLineKeyPress(Sender: TObject; var Key: Char);
begin
if Key = #13 then begin
@ -46,6 +39,12 @@ end;
procedure TfrmGoToLine.FormShow(Sender: TObject);
begin
txtGoToLine.SetFocus;
txtGoToLine.SelectAll;
end;
procedure TfrmGoToLine.txtGoToLineChange(Sender: TObject);
begin
cmdOK.Enabled := StrToIntDef(txtGoToLine.Text, -1) > 0;
end;
end.