
I was wondering if there's a dialog in the gui code that has built-in sliders? E.g., currently our extension module subclasses ModelessDialog; however, our input panel has so many values that it would be convenient if it was embedded in a widget such that sliders appeared when it was resized smaller. thanks, Randy

On Apr 21, 2008, at 12:42 PM, Randy Heiland wrote:
I was wondering if there's a dialog in the gui code that has built-in sliders? E.g., currently our extension module subclasses ModelessDialog; however, our input panel has so many values that it would be convenient if it was embedded in a widget such that sliders appeared when it was resized smaller.
Hi Randy, Not directly. One possibility is to use Pmw.ScrolledFrame (http:// pmw.sourceforge.net/doc/ScrolledFrame.html) as the parent widget for the contents of your dialog. Take the frame you get as an arg to the fillInUI() method and immediately create a Pmw.ScrolledFrame with that frame as the parent. Then fill your dialog in from the frame you get from Pmw.ScrolledFrame.interior(). You can do this almost painlessly like so: def fillInUI(self, parent): sf = Pmw.ScrolledFrame(parent) sf.grid(sticky="nsew") origParent, parent = parent, sf.interior() # remainder of fillInUI() remains the same... Another possibility is to use the Feature_Buttons_Panel widget from Chimera's CGLtk.Hybrid module. This is what Volume Viewer uses to hide/show sections of its interface. You'd have to look at the Volume Viewer code to see how it's called since I haven't used it myself. --Eric Eric Pettersen UCSF Computer Graphics Lab http://www.cgl.ucsf.edu
participants (2)
-
Eric Pettersen
-
Randy Heiland