Add gui instance hide()/show() methods
See original GitHub issueThe existing open()
/close()
make the GUI scroll up as if the user clicked the “Close Controls” button. It’d be nice if there was a way to assert that a particular gui is hidden or shown rather than having a global toggle for show all/hide all functionality. The only API for hiding/showing currently is the non-instance-specific dat.GUI.toggleHide()
. If you had multiple GUIs, that means you can’t hide one individually. Also, if, depending on how you organized your code, you want to assert that a particular gui instance is shown, you have to keep track of whether or not it is currently shown and decide whether or not to cal dat.GUI.toggleHide()
.
The sort of thing I’d like to be able to do:
var gui = new dat.GUI();
gui.add({x: 2}, 'x', 1, 3).onChange(function (value) {
console.log('x changed to: ' + x);
});
gui.hide();
/* And show it in response to some event: */
gui.show();
/* And show it depending on some expression: */
gui.toggleHide(myState == 'showGui');
/* And per-gui simple toggle: */
gui.toggleHide();
Issue Analytics
- State:
- Created 8 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
How to show and hide widgets in Tkinter? - Tutorialspoint
In order to display/show the widget, use pack() geometry manager; To hide any widget from the application, use pack_forget() method.
Read more >c# - Hide an Instance of a Window - Stack Overflow
I Can show the Login Window with : "Application.Current.MainWindow.Show();", but i dont know how to hide the Register-Window. Normally i would ...
Read more >Hide and Unhide The Window in Tkinter - Python
withdraw() is used to hide the window. Syntax: withdraw(). Approach: Import module; Create a normal window; Add buttons to perform hide and ...
Read more >Tkinter: How to Show / Hide a Window - Mouse Vs Python
Some examples say that you need to call the update() method before you call the deiconify() one, however if you comment out the...
Read more >lil-gui 0.17.0
Folders. You can organize controllers in collapsible groups using addFolder() . The method returns a new GUI instance representing the folder. You can...
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
@magdesign i think that
dat.GUI.toggleHide()
might do thatThe TS typings are maintained externally, and may need to be updated.
https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/dat.gui