How do I use a toggle button to change a DeviceBrowser group

I’m trying to follow along with John’s DeviceBrowser tutorial video. At first it seemed like isChecked wasn’t working. Then I did a bit of looking at the help and found out that only works for toggle buttons. So I changed them to toggle, but there must be more to it because clicking one button and then clicking a second one leaves isChecked true on both buttons. I tried adding a event trigger in one button to clear isChecked on the other button but that didn’t help.

Unless I missed it, in the video, John only showed the settings for the DeviceBrowser and not the settings for the buttons at the top. I’m very much an HR newbie (only found out about it a couple of days ago) so I suspect I’m missing something, but I haven’t been able to figure it out yet. Any ideas?

Clicking a Button #2 is not going to clear IsChecked on Button #1. Toggle means that when you click Button #1 1 time it sets IsChecked. When you click that same Button a 2nd time it clears IsChecked. There is no relationship between Button #1 & Button #2. They both operate independently.

Right. That’s exactly what I thought. So then I don’t understand how John’s example works. What I’m wanting to accomplish is to have two buttons I can click that change the Group property on a DeviceBrowser control. Click button 1 and the DeviceBrowser displays a group. Click button two and the DeviceBrowser displays a different group. Can you suggest the right way to do that?

Also, I’m going to post more details later, but I have to say that I’m really impressed with HR - especially compared to what I’ve been using previously.

I don’t think you even need a Toggle button to do that. Just use a normal button. In the Clicked EventTrigger add a PropertyAction that updates the Group property on the DeviceBrowser control. You will need to assign the DeviceBrowser control a Name in order for the PropertyAction to see it.

That’s actually the first thing I tried, but nothing happened when I clicked the button. I’ll look at everything again (or maybe start fresh) to see if I missed something.

Pilot error (as I suspected). I didn’t realize that I needed to specify the event for the event trigger. So there was no value for Event. Oops.

Thanks for the quick response Bill, and again - great app!!! There are so many things to like about it, but two of my favorites so far are the DeviceBrowser, and the ability to set most any property on a control via an event or data trigger. :slightly_smiling_face:

1 Like