botton_state

Posted By: F_P_kefas

botton_state - 06/16/09 19:11

I have a problem, whit the outstanding explanation of button_state function from the manual:

button_state(PANEL*,var num,var state)
Changes or returns the button state of a panel.

Parameters:
PANEL* Panel pointer.
num The number of the button, starting with 1.
state The new state of a radio or toggle button, ON (1) or OFF (0). -1 leaves the button state unchanged.

from where starts the COUNTING ?

Which button is 1?????
The first declared on the panel ?
Do I need something more to set the state of all the toggle buttons of a panel?
Posted By: Enduriel

Re: botton_state - 06/16/09 19:18

PANEL* = the panel with the buttons you want to modify its state

num = number ID of the button, first declared button is num 1, second declared button is 2 etc

state = if you input 1, then the button number chosen is set to ON, if you put 0, then it's set to OFF.
Posted By: F_P_kefas

Re: botton_state - 06/16/09 19:20

that's just not working.
have you tried ?

One toggle or radio button always remains ON.
Posted By: EvilSOB

Re: botton_state - 06/17/09 10:07

I tried it back in 7.73 and it worked then.
Are you sure your buttons are radio OR toggle buttons?
And when counting buttons to get their number, you DO have to
count notmal buttons too.
Posted By: MMike

Re: botton_state - 06/13/10 19:28

Im so sorry , i just now found this post by searching.. and im having the same problem.
IT is not working the setting of the button...

i will cross link my POST :

Button state problem [with code]
© 2023 lite-C Forums