2005-08-26 18:29:39 +00:00
|
|
|
unit UnitfrmGoToLine;
|
|
|
|
|
|
|
|
interface
|
|
|
|
|
|
|
|
uses
|
|
|
|
SysUtils, Windows, Messages, Classes, Graphics, Controls,
|
|
|
|
StdCtrls, ExtCtrls, Forms, mbTBXEdit, mbTBXValidateEdit, TBXDkPanels,
|
2006-03-06 19:47:22 +00:00
|
|
|
SpTBXDkPanels, SpTBXEditors, SpTBXControls;
|
2005-08-26 18:29:39 +00:00
|
|
|
|
|
|
|
type
|
|
|
|
TfrmGoToLine = class(TForm)
|
2006-09-30 19:03:49 +00:00
|
|
|
pnlBG: TSpTBXPanel;
|
2005-08-26 18:29:39 +00:00
|
|
|
lblCaption: TLabel;
|
|
|
|
cmdCancel: TSpTBXButton;
|
2006-09-30 19:03:49 +00:00
|
|
|
cmdOK: TSpTBXButton;
|
|
|
|
txtGoToLine: TSpTBXEdit;
|
2005-08-26 18:29:39 +00:00
|
|
|
procedure txtGoToLineKeyPress(Sender: TObject; var Key: Char);
|
|
|
|
procedure FormShow(Sender: TObject);
|
2006-09-30 19:03:49 +00:00
|
|
|
procedure txtGoToLineChange(Sender: TObject);
|
2005-08-26 18:29:39 +00:00
|
|
|
end;
|
|
|
|
|
|
|
|
var
|
|
|
|
frmGoToLine: TfrmGoToLine;
|
|
|
|
|
|
|
|
implementation
|
|
|
|
|
|
|
|
uses UnitMainTools;
|
|
|
|
|
|
|
|
{$R *.DFM}
|
|
|
|
|
|
|
|
procedure TfrmGoToLine.txtGoToLineKeyPress(Sender: TObject; var Key: Char);
|
|
|
|
begin
|
|
|
|
if Key = #13 then begin
|
|
|
|
cmdOK.Click;
|
|
|
|
Key := #0;
|
|
|
|
end;
|
|
|
|
end;
|
|
|
|
|
|
|
|
procedure TfrmGoToLine.FormShow(Sender: TObject);
|
|
|
|
begin
|
|
|
|
txtGoToLine.SetFocus;
|
2006-09-30 19:03:49 +00:00
|
|
|
txtGoToLine.SelectAll;
|
|
|
|
end;
|
|
|
|
|
|
|
|
procedure TfrmGoToLine.txtGoToLineChange(Sender: TObject);
|
|
|
|
begin
|
|
|
|
cmdOK.Enabled := StrToIntDef(txtGoToLine.Text, -1) > 0;
|
2005-08-26 18:29:39 +00:00
|
|
|
end;
|
|
|
|
|
|
|
|
end.
|