seafight17 Posted May 11, 2012 Share Posted May 11, 2012 (edited) 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 May 11, 2012 by Freddy Quote Link to comment Share on other sites More sharing options...
Bixby Sayz Posted May 11, 2012 Share Posted May 11, 2012 The Checked property will be True if it is checked. (In this case CheckBox1.Checked) Quote Link to comment Share on other sites More sharing options...
seafight17 Posted May 12, 2012 Author Share Posted May 12, 2012 yes but i i write this procedure? Which are the steps? Quote Link to comment Share on other sites More sharing options...
shadowrecon Posted May 12, 2012 Share Posted May 12, 2012 [scar] Function BoxChecked: Boolean; Begin Result := CheckBox1.Checked; end; [/scar] Quote Link to comment Share on other sites More sharing options...
seafight17 Posted May 12, 2012 Author Share Posted May 12, 2012 thanks very very much! Quote Link to comment Share on other sites More sharing options...