Jump to content
seafight17

TCheckBox ; procedure

Recommended Posts

ok its is maybe a stupit qustion but i want one prodesure (or function ) so if "checkbox" is "tik: it will be the result true or false? >>

program new;

 

var

Form1: TForm;

Button1 : TButton;

CheckBox1,CheckBox2: TCheckBox ;

Edit1:TEdit;

procedure buttonclick(sender: TObject);

begin

Writeln('Button pressed!');

Form1.Caption:= Form1.Caption + '.';

Form1.ModalResult:= mrOk;

end;

 

procedure IDForm;

begin

Form1 :=CreateForm;

Form1.Left:= 329 ;

Form1.Top:= 151 ;

Form1.Caption:= 'Form1' ;

Form1.ClientHeight:= 206 ;

Form1.ClientWidth:= 312 ;

Form1.Color:=clBtnFace ;

Form1.Font.Charset:=DEFAULT_CHARSET;

Form1.Font.Color:=clWindowText ;

Form1.Font.Height:= -11 ;

Form1.Font.Name:='Tahoma' ;

Form1.Font.Style:=[] ;

Form1.OldCreateOrder:=False ;

Form1.PixelsPerInch:=96 ;

 

Button1 := TButton.Create(Form1);

Button1.OnClick:= @buttonclick;

Button1.Parent := Form1;

Button1.Left:=188 ;

Button1.Top:=172 ;

Button1.Width:=76 ;

Button1.Height:=24 ;

Button1.Caption:='Done';

Button1.TabOrder:=1 ;

 

Edit1:= TEdit.Create(Form1);

Edit1.Parent := Form1;

Edit1.Left:=21 ;

Edit1.Top:=28 ;

Edit1.Width:=247 ;

Edit1.Height:=21 ;

Edit1.Enabled:=False ;

Edit1.ParentColor:=True ;

Edit1.TabOrder:=0 ;

Edit1.Text:='quwstion';

 

CheckBox1:= TCheckBox.Create(Form1);

CheckBox1.Parent := Form1;

CheckBox1.Left:=188;

CheckBox1.Top:=56;

CheckBox1.Width:=88 ;

CheckBox1.Height:=24;

CheckBox1.Caption:='anser1';

CheckBox1.TabOrder:=2;

 

 

end;

 

procedure SafeIDForm;

var

v: TVariantArray;

begin

setarraylength(V, 0);

ThreadSafeCall('IDForm', v);

end;

 

procedure ShowFormModal;

begShowModal;

end;

 

procedure SafeShowFormModal;

var

v: TVariantArray;

begin

setarraylength(V, 0);

ThreadSafeCall('ShowFormModal', v);

end;

 

begin

SafeIDForm;

SafeShowFormModal;

end.

in

Form1.

Edited by Freddy
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
  • Create New...