Exposing widget controls

I am writing a widget to control some LCD displays, currently only power control. If I had six of these widgets, how would I add a couple of buttons to the layout that controls all six of the displays.

I was thinking of putting a parameter listener in the widget, but I feel I am over complicating it. I am hoping there is a simpler way.

Hi Richard,

What do you mean by “I am writing a widget…”? Are you writing a ?
What are using for control over these displays? RossTalk, UDP, HTTP, OGP, a listener, etc…

Until I have a more detailed understanding of what you are doing and what you are trying to exactly achieve I won’t be much help.

Anthony,

Thank you for the reply. Yes, a widgetdescriptor, communication will be via an HTTP REST API. I am not after specific help with the widget, my question is more generic. Let’s assume I get the widget to work as desired (I have already made one for Adder XDIP KVM receivers).

Let’s assume widget had two buttons power On and Off, how would I go about having a pair of buttons on the main canvas (not in a widget) that can effectively press the On button on multiple widgets?

Richard,

Understood. Well there are a variety of approaches. The approach I would probably take is just to simply to declare a function in an tag that is at the global scope of your panel. Then call said function from the button within your widget. Then if you also wanted to have a button that triggers all screens you would just make a button outside of your widget that calls that function however many times needed with the appropriate argument configurations for each screen. This is what I would recommend for best practice.

Please let me know if you need any further help with this or if you would like to hear a different approach.

Example of another approach could be using GPI triggers(Not how I would do this but could also work).

Antony,

Thank you. Obvious when you know how! Works perfectly.

Awesome! Glad to hear that worked out! Absolutely no problem at all :slight_smile: