Page 1 of 1

Checkbox ONINIT

Posted: Thu Jun 09, 2011 6:53 pm
by nassausky
I think this is a very basic question but I haven't worked with Harbour in at least a year.

Assuming I have the most basic form with a single checkbox:

How can I have that checkbox automatically be checked (TRUE) on starting the application. The Main form event seems to run before the checkbox is created so I can't assign the logical value there.

Re: Checkbox ONINIT

Posted: Thu Jun 09, 2011 7:38 pm
by Rathinagiri
You can assign the value at the time of definition itself.

For example,

Code: Select all

define checkbox cb1
   row 10
   col 10
   caption 'This is a checkbox'
   value .t.
end checkbox
or

Code: Select all

@ 10,10, checkbox cb1 caption 'This is a checkbox' value .t.

Re: Checkbox ONINIT

Posted: Thu Jun 09, 2011 8:41 pm
by nassausky
Thanks. That was so simple. :oops: