How to work with ToggleButton
-
-
Hi all, Please tell me how to work with ToggleButton I need to use two buttons- if i select one the other should be desibled,vice versa. Hope u got my question.-Just a sample Toggle Button. Please help me. pashi
prashanth, s/w Engineer, Syfnosys.
I don't see any logic here. You want to have 2 buttons. If you select one button which disables the other one, how do you want to enable it back? And how can it be ToggleButton? You can not click disabled buttons so how does it have to work as ToggleButton? :O You would have to enable the other one back (by clicking some other third button, or the same first button again) before clicking it and disabling the first one. Have you tried using check boxes or radio buttons? You can also use one button as some kind of ToggleButton by checking some conditions in the click button method
-
I don't see any logic here. You want to have 2 buttons. If you select one button which disables the other one, how do you want to enable it back? And how can it be ToggleButton? You can not click disabled buttons so how does it have to work as ToggleButton? :O You would have to enable the other one back (by clicking some other third button, or the same first button again) before clicking it and disabling the first one. Have you tried using check boxes or radio buttons? You can also use one button as some kind of ToggleButton by checking some conditions in the click button method
Newbie00 wrote:
I don't see any logic here. You want to have 2 buttons. If you select one button which disables the other one, how do you want to enable it back? And how can it be ToggleButton? You can not click disabled buttons so how does it have to work as ToggleButton? :O You would have to enable the other one back (by clicking some other third button, or the same first button again) before clicking it and disabling the first one. Have you tried using check boxes or radio buttons? You can also use one button as some kind of ToggleButton by checking some conditions in the click button method
I guess you can follow the conventional toggling method with a single button and a related flag variable. click it, flag becomes 1, click it again, flag becomes 0, and act accordingly. Change some text and appearance for the two states. That's as simple as it can get. Oh, you have to take care of the initial state also. You know, the default value thing. :->
ASP - AJAX is SEXY. PERIOD.
-
Newbie00 wrote:
I don't see any logic here. You want to have 2 buttons. If you select one button which disables the other one, how do you want to enable it back? And how can it be ToggleButton? You can not click disabled buttons so how does it have to work as ToggleButton? :O You would have to enable the other one back (by clicking some other third button, or the same first button again) before clicking it and disabling the first one. Have you tried using check boxes or radio buttons? You can also use one button as some kind of ToggleButton by checking some conditions in the click button method
I guess you can follow the conventional toggling method with a single button and a related flag variable. click it, flag becomes 1, click it again, flag becomes 0, and act accordingly. Change some text and appearance for the two states. That's as simple as it can get. Oh, you have to take care of the initial state also. You know, the default value thing. :->
ASP - AJAX is SEXY. PERIOD.