Checkbox ONINIT

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
nassausky
Posts: 21
Joined: Wed Nov 18, 2009 4:41 pm

Checkbox ONINIT

Post 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.
_________________
Sincerely,

Mike
User avatar
Rathinagiri
Posts: 5482
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: Checkbox ONINIT

Post 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.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
nassausky
Posts: 21
Joined: Wed Nov 18, 2009 4:41 pm

Re: Checkbox ONINIT

Post by nassausky »

Thanks. That was so simple. :oops:
_________________
Sincerely,

Mike
Post Reply