Background Light toggle
See original GitHub issueHi,
I’m adding some custom functionality as part of a customized panel and I would like to toggle the background light in certain scenarios (via the code).
I am able to get it to dark, but not to light again thereafter. I could see that the properties of “view options” - “background color” and “background color 2” change their values. However, I could not see any changes made to the grid.
The code I’m using:
grid = om.getOrCreateContainer('grid')
viewOptions = vis.ViewOptionsItem(self.view)
viewBackgroundLightHandler = self.viewcolors.ViewBackgroundLightHandler(viewOptions, grid, app.getToolsMenuActions()['ActionToggleBackgroundLight'])
viewBackgroundLightHandler.action.trigger()
Could you please assist?
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
Moonlight4225 Wood Rustic Light Wooden Background ...
Sold By. Amazon.com ; switch type. Toggle ; material. Wood ; dimensions. 0.25 x 5.06 x 5.38 inches ; finish type. Light Oak....
Read more >Toggle - Light Switches - Wiring Devices & Light Controls
Get free shipping on qualified Toggle Light Switches products or Buy Online Pick Up in Store today in the Electrical Department.
Read more >Light Switch Pictures | Download Free Images on Unsplash
Download the perfect light switch pictures. Find over 100+ of the best free light switch images. ... a red background with a bunch...
Read more >How To Toggle Between Dark and Light Mode - W3Schools
Switch between dark and light mode with CSS and JavaScript. Toggle Dark/Light Mode. Click the button to toggle ... background-color: white; color: black;...
Read more >Light Switch White Background royalty-free images
Find Light Switch White Background stock images in HD and millions of other royalty-free stock photos, illustrations and vectors in the Shutterstock ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Great! Yes, anything variable you can access in the Python console in Director should also be available in the
globalsDict
of that script.I assume that the function in your
startup.py
is called likestartup(robotSystem, globals())
. So that means that inside the function you can access theviewBackgroundLightHandler
as:And then pass that variable in to the constructor of your panel.