Clickable Button that toggles a boolean

Questions about MultiCharts and user contributed studies.
DanielFXS
Posts: 29
Joined: 08 Oct 2019
Has thanked: 10 times
Been thanked: 4 times

Clickable Button that toggles a boolean

Postby DanielFXS » 18 Aug 2022

Is it possible to create a custom button that toggles a boolean in a signal or study?

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

Re: Clickable Button that toggles a boolean

Postby TJ » 19 Aug 2022

Can you give an example?
Maybe draw a flowchart to illustrate your vision?

DanielFXS
Posts: 29
Joined: 08 Oct 2019
Has thanked: 10 times
Been thanked: 4 times

Re: Clickable Button that toggles a boolean

Postby DanielFXS » 20 Aug 2022

So my exact usage would be this. I have charts set up with a study that display a number of inputs texts. These inputs are then sent to my signals via global variables.
Sometimes I want to change a boolean value quickly without having to open the format study modal and type in 'true' or 'false' save and close . See attached image. My plan would be to click on a button and the boolean value just toggles on and off.
Screenshot 2022-08-20 053536.png
(188.57 KiB) Not downloaded yet

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

Re: Clickable Button that toggles a boolean

Postby TJ » 20 Aug 2022

Go to Wiki
Go to PowerLanguage Keyword Reference
Look under MouseClickEvents‎ (6 P)

DanielFXS
Posts: 29
Joined: 08 Oct 2019
Has thanked: 10 times
Been thanked: 4 times

Re: Clickable Button that toggles a boolean

Postby DanielFXS » 24 Aug 2022

Thanks TJ. Hopefully I'll be able to find a nice solution using these Mouse Click Events.


Return to “MultiCharts”