2005-08-26 22:29:39 +04:00
|
|
|
unit UnitfrmGoToLine;
|
|
|
|
|
|
|
|
interface
|
|
|
|
|
|
|
|
uses
|
|
|
|
SysUtils, Windows, Messages, Classes, Graphics, Controls,
|
|
|
|
StdCtrls, ExtCtrls, Forms, mbTBXEdit, mbTBXValidateEdit, TBXDkPanels,
|
2006-03-06 22:47:22 +03:00
|
|
|
SpTBXDkPanels, SpTBXEditors, SpTBXControls;
|
2005-08-26 22:29:39 +04:00
|
|
|
|
|
|
|
type
|
|
|
|
TfrmGoToLine = class(TForm)
|
2006-09-30 23:03:49 +04:00
|
|
|
pnlBG: TSpTBXPanel;
|
2005-08-26 22:29:39 +04:00
|
|
|
lblCaption: TLabel;
|
|
|
|
cmdCancel: TSpTBXButton;
|
2006-09-30 23:03:49 +04:00
|
|
|
cmdOK: TSpTBXButton;
|
|
|
|
txtGoToLine: TSpTBXEdit;
|
2005-08-26 22:29:39 +04:00
|
|
|
procedure txtGoToLineKeyPress(Sender: TObject; var Key: Char);
|
|
|
|
procedure FormShow(Sender: TObject);
|
2006-09-30 23:03:49 +04:00
|
|
|
procedure txtGoToLineChange(Sender: TObject);
|
2005-08-26 22:29:39 +04: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 23:03:49 +04:00
|
|
|
txtGoToLine.SelectAll;
|
|
|
|
end;
|
|
|
|
|
|
|
|
procedure TfrmGoToLine.txtGoToLineChange(Sender: TObject);
|
|
|
|
begin
|
|
|
|
cmdOK.Enabled := StrToIntDef(txtGoToLine.Text, -1) > 0;
|
2005-08-26 22:29:39 +04:00
|
|
|
end;
|
|
|
|
|
|
|
|
end.
|