amxmodx/editor/studio/UnitfrmGoToLine.pas

51 lines
1.0 KiB
ObjectPascal
Raw Normal View History

2005-08-26 22:29:39 +04:00
unit UnitfrmGoToLine;
interface
uses
SysUtils, Windows, Messages, Classes, Graphics, Controls,
StdCtrls, ExtCtrls, Forms, mbTBXEdit, mbTBXValidateEdit, TBXDkPanels,
SpTBXDkPanels, SpTBXEditors, SpTBXControls;
2005-08-26 22:29:39 +04:00
type
TfrmGoToLine = class(TForm)
pnlBG: TSpTBXPanel;
2005-08-26 22:29:39 +04:00
lblCaption: TLabel;
cmdCancel: TSpTBXButton;
cmdOK: TSpTBXButton;
txtGoToLine: TSpTBXEdit;
2005-08-26 22:29:39 +04:00
procedure txtGoToLineKeyPress(Sender: TObject; var Key: Char);
procedure FormShow(Sender: TObject);
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;
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.