{* * @(#) sdesigne.pas - System Designer program ('edit box' module). * (c) 1997 Ivan Maidanski http://ivmai.chat.ru * Freeware program source. All rights reserved. ** * Language: Delphi * Tested with: Borland Delphi DeskTop 2.01 for Windows 95 * Last modified: 1997-04-18 14:40:00 GMT+04:00 *} unit SDesignE; interface uses Forms, StdCtrls, Buttons, Controls, Classes; {$EXTENDEDSYNTAX ON} {$LONGSTRINGS ON} type TModifyForm = class(TForm) OKButton: TBitBtn; CancelButton: TBitBtn; ValueNameLabel: TLabel; EditNameBox: TEdit; ValueDataLabel: TLabel; EditDataBox: TEdit; procedure BoxActivate(Sender: TObject); public function Execute(Name: String; var Data: String): Boolean; end; var ModifyForm: TModifyForm; implementation {$R sdesigne.dfm} {$BOOLEVAL OFF} procedure TModifyForm.BoxActivate(Sender: TObject); begin EditDataBox.SetFocus; EditDataBox.SelectAll; end; function TModifyForm.Execute(Name: String; var Data: String): Boolean; begin EditNameBox.Text:=Name; EditDataBox.Text:=Data; Execute:=False; if (ShowModal=mrOk) and (Data<>EditDataBox.Text) then begin Data:=EditDataBox.Text; Execute:=True; end; end; end.