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

Toggling a toggle button with another toggle button

Highlighted

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
Highlighted

Re: Toggling a toggle button with another toggle button

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

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

Highlighted

Re: Toggling a toggle button with another toggle button

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

Highlighted

Re: Toggling a toggle button with another toggle button

Rohit,

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


the string correct is

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


Bye

Giuseppe

Highlighted

Re: Toggling a toggle button with another toggle button

Yes, Thank u Giuseppe Fiore

Announcements
Join an
AR Working Group!

Topics available:
AR/VR for Data Optimization AR/VR for Security and Control AR/VR for Inspection