cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

Toggling a toggle button with another toggle button

AllanThompson
16-Pearl

Toggling a toggle button with another toggle button

Hi All,

I'm having a bit of fun with toggle buttons and was wondering if anyone can wee what I'm doing wrong.

I have two toggle buttons - Toggle A which is pressed and Toggle B which is unpressed.  I want to set the experience so that when Toggle B is pressed, Toggle A is unpressed and visa versa.

So I created a binding by dragging pressed for Toggle B onto Toggle A and selecting not pressed as shown:

Clipboard01.png

But when I press Toggle B, nothing happens to Toggle A.  My ultimate goal is to have a number of buttons where pressing one will unpress all the others.  I could achieve the result I"m after with some Java, but I'd rather do it without having to code.  Am I missing something here?

Many thanks,

Allan

4 REPLIES 4

Try by using disable function or else write script for particular button like,

view.wdg['ButtonID']['pressed']=false;

Thanks Rohit.

This disable function actually stops the button from functioning, but I want it to function, but get set to disabled.

I know that I can use Java to do it, as you've indicated, but I"m trying to do it without using Java, and from looking at the binding option that I've shown in my screenshot, it looks like it should be possible.

To me, it looks like a bug, but maybe I'm missing something.

Allan

Rohit,

you have missing $scope before view.wdg['ButtonID']['pressed']=false;


the string correct is

$scope.view.wdg['ButtonID']['pressed']=false;


Bye

Giuseppe

Yes, Thank u Giuseppe Fiore

Top Tags