Table of Contents
Defines the GPanel that is used in the GPanelApp framework (see grail.widgets.gpanelapp).
The idea here is that if you inherit from a GPanel, and override the makewidgets attribute, then we have a consistent method for constructing panels.
Note
The grail.compass package has a specialized version of the GPanelApp class that can be used within MineSight®-Compass. To use a GPanel with a Compass capable script you will need to use the grail.compass.cmpsys module's runprocedure function.
The following code illustrates creating a panel for use with a the standard Compass panel application.
Notice that in our example that self (a reference to our particular instance of a GPanel), is the parent frame for all our widgets.
As a user of the MineSight® Grail library will never create an instance of the GPanel class directly. Instead you would supply your sub-class definitions of a GPanel to the a GPanelApp instance.
Override this method to design your panel.
Note
The class itself is should be your parent frame for your widgets.
Extend this method to do any processing prior to displaying the panel. This function should return 1 if the hide event is to proceed, and return 0 if you do not want the panel to show.
The default return value is always 1.
Extend this method to do any processing after the panel has disappeared. This function should return 1 if the hide event is to proceed, and return 0 if you do not want the panel to hide.
The default return value is always 1.
Allows composers to remember their widgets.
Remembered widgets can be disabled/enabled, and validation checks can be made on widgets that have been remembered.
Thats about all. So if you have a list of labels, there's no need to remember those, because Labels are rather benign creatures.
In addition, you should only remember G* widgets, because these widgets only have the required additional methods. Other, Tkinter widgets, like Tkinter.Button, will essentially only be useful in causing a performance hit in your application because we have to look at them to realize that we can't do anything interesting with them.