May 04, 2024, 02:49:59 PM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


Checkboxes & Radio buttons

Started by Techno, September 15, 2007, 01:57:38 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Techno

Dear programmers

I don't find in the help how I can set the boolean value and read this value.
In VB is it very simple, but witch command do I use in EBASIC and what are the WinAPI messages.

Thanks

Dogge

Hi,
use GetState and SetState for that.

from the documentation:
SETSTATE window | dialog, ID, state
Sets or resets a checkbox or radio button control. State can either be 0 to uncheck the control or 1 to check the control.

state =  GETSTATE (window | dialog, ID)
Returns the state of a checkbox or radio button control. Returns 1 if control is checked and 0 if control is unchecked. Radio buttons in a group are mutually exclusive. When a radio button is selected your program will receive an @IDCONTROL message with @CONTROLID containing the newly selected radio button. If the radio button is created outside of a group, you will need to use GETSTATE to determine whether the button is selected.