Base class for entry paired with a button that launches an interactive dialog.
More...
Data descriptors inherited from dialog.entry.BareEntry: |
def | width |
Data descriptors inherited from dialog.widget.Widget: |
def | __dict__ |
| dictionary for instance variables (if defined)
|
def | __weakref__ |
| list of weak references to the object (if defined)
|
def | default_color |
def | widget |
| The main Tkinter widget for this item.
|
Data and other attributes inherited from dialog.widget.Widget: |
| Enabled = True |
| Extras = None |
tuple | RuleRegistry = ((<function <lambda>>, <function <lambda>>),) |
Data descriptors inherited from dialog.item.Item: |
def | children |
def | dialog |
def | item_valid |
def | no_pack |
def | parent |
def | root |
| This actually searches up the tree for a model root because this can change as the dialog is being built.
|
def | rules |
| Returns a list of all of the current rule skeletons.
|
Data descriptors inherited from dialog.builder.Builder: |
def | label_width |
Detailed Description
Constructor & Destructor Documentation
def JoistMemberCore.Setup.Choose.__init__ |
( |
|
args | ) |
|
Member Function Documentation
def JoistMemberCore.Setup.Choose.__delitem__ |
( |
|
args | ) |
|
This function actually destroys the child and all of its children.
All tk widgets will be destroyed. All items are removed from the tree
and destroyed as soon as possible.
Reimplemented from dialog.entry.BareEntry.
def JoistMemberCore.Setup.Choose.__dict__ |
( |
|
args | ) |
|
def JoistMemberCore.Setup.Choose.__get__ |
( |
|
args | ) |
|
def JoistMemberCore.Setup.Choose.__get_children__ |
( |
|
args | ) |
|
def JoistMemberCore.Setup.Choose.__get_dialog__ |
( |
|
args | ) |
|
def JoistMemberCore.Setup.Choose.__get_name__ |
( |
|
args | ) |
|
def JoistMemberCore.Setup.Choose.__get_root__ |
( |
|
args | ) |
|
This actually searches up the tree for a model root because
this can change as the dialog is being built.
Reimplemented from dialog.entry.BareEntry.
def JoistMemberCore.Setup.Choose.__get_widget__ |
( |
|
args | ) |
|
def JoistMemberCore.Setup.Choose.__get_width__ |
( |
|
args | ) |
|
def JoistMemberCore.Setup.Choose.__getnopack__ |
( |
|
args | ) |
|
def JoistMemberCore.Setup.Choose.__getparent__ |
( |
|
args | ) |
|
def JoistMemberCore.Setup.Choose.__getrules__ |
( |
|
args | ) |
|
def JoistMemberCore.Setup.Choose.__getvalid__ |
( |
|
args | ) |
|
def JoistMemberCore.Setup.Choose.__getwidget_valid__ |
( |
|
args | ) |
|
def JoistMemberCore.Setup.Choose.__initialize_lbl_width__ |
( |
|
args | ) |
|
def JoistMemberCore.Setup.Choose.__model_set__ |
( |
|
args | ) |
|
Override this if you're interested in sets while your value may be mixed.
This is usually unecessary. But it's needed for widgets like ContentListbox.
This may not be called consistently, if you get a call to __set__
consider that a __model_set__ on all model numbers.
Reimplemented from dialog.entry.BareEntry.
def JoistMemberCore.Setup.Choose.__pending__ |
( |
|
args | ) |
|
def JoistMemberCore.Setup.Choose.__place_button__ |
( |
|
args | ) |
|
def JoistMemberCore.Setup.Choose.__recalculate_lbl_width__ |
( |
|
args | ) |
|
def JoistMemberCore.Setup.Choose.__set__ |
( |
|
args | ) |
|
def JoistMemberCore.Setup.Choose.__set_widget__ |
( |
|
args | ) |
|
def JoistMemberCore.Setup.Choose.__set_width__ |
( |
|
args | ) |
|
def JoistMemberCore.Setup.Choose.__setnopack__ |
( |
|
args | ) |
|
def JoistMemberCore.Setup.Choose.__setwidget_valid__ |
( |
|
args | ) |
|
def JoistMemberCore.Setup.Choose.__show__ |
( |
|
args | ) |
|
def JoistMemberCore.Setup.Choose.__show_affected__ |
( |
|
args | ) |
|
def JoistMemberCore.Setup.Choose.__weakref__ |
( |
|
args | ) |
|
def JoistMemberCore.Setup.Choose.__widget_state__ |
( |
|
args | ) |
|
def JoistMemberCore.Setup.Choose.AddContext |
( |
|
args | ) |
|
def JoistMemberCore.Setup.Choose.AddRule |
( |
|
args | ) |
|
def JoistMemberCore.Setup.Choose.AddStateFunction |
( |
|
args | ) |
|
Append a function to the list of functions used to evaluate
the current state (enabled/disabled) of this widget.
Functions will be passed no arguments and should return True if
this Item should be enabled. False if it should be disabled.
Reimplemented from dialog.entry.BareEntry.
def JoistMemberCore.Setup.Choose.affected |
( |
|
args | ) |
|
def JoistMemberCore.Setup.Choose.button |
( |
|
args | ) |
|
Creates a button widget
@param label The text on the button
@param command A callable object taking no arguments which will be
called when the button is clicked/activated
@return the button.Button object
Reimplemented from dialog.entry.BareEntry.
def JoistMemberCore.Setup.Choose.call |
( |
|
args | ) |
|
def JoistMemberCore.Setup.Choose.Changed |
( |
|
args | ) |
|
Call this routine when your displayed representation (available through __get__)
has changed in a way that would affect the value.
@note This is mainly for class implementors.
Reimplemented from dialog.entry.BareEntry.
def JoistMemberCore.Setup.Choose.check |
( |
|
args | ) |
|
def JoistMemberCore.Setup.Choose.checkbutton |
( |
|
args | ) |
|
This method is deprecated
It exists for compatibility with older code.
You should look into the "check" method. It
creates checkbuttons one at a time.
Reimplemented from dialog.entry.BareEntry.
def JoistMemberCore.Setup.Choose.child_added |
( |
|
args | ) |
|
def JoistMemberCore.Setup.Choose.child_removed |
( |
|
args | ) |
|
def JoistMemberCore.Setup.Choose.children |
( |
|
args | ) |
|
def JoistMemberCore.Setup.Choose.Color |
( |
|
args | ) |
|
@returns a hex color code (as a str) based on current Field
attributes. This is the color your widget should appear
as overall.
Reimplemented from dialog.entry.BareEntry.
def JoistMemberCore.Setup.Choose.column |
( |
|
args | ) |
|
def JoistMemberCore.Setup.Choose.column_group_begin |
( |
|
args | ) |
|
def JoistMemberCore.Setup.Choose.column_group_end |
( |
|
args | ) |
|
def JoistMemberCore.Setup.Choose.default_color |
( |
|
args | ) |
|
def JoistMemberCore.Setup.Choose.Destroy |
( |
|
args | ) |
|
def JoistMemberCore.Setup.Choose.dialog |
( |
|
args | ) |
|
def JoistMemberCore.Setup.Choose.dim |
( |
|
args | ) |
|
Create a dimension field which is a label to the left of an entry
widget and displays dimensions as strings and floats.
@param name The name of this field
@param initial_value This is the default value to start with
if a model is not provided to the dialog.
@param label a string to display in a label to the left of
the entry box
@param width
@param length
@param style The style of the dimension. @see dimension.DimensionStyled
Reimplemented from dialog.entry.BareEntry.
def JoistMemberCore.Setup.Choose.DisableIf |
( |
|
args | ) |
|
Disable this item if expression is True
@param expression Must be a string representing a python
expression which returns True or False. True
indicating that you should disable the item for now.
False indicating that you shouldn't.
You may use, as variable names, any field name
within the model.
Example:
dlg = Dialog()
e = dlg.entry( 'name', 5 )
e2 = dlg.entry( 'other', 6 )
e2.DisableIf( 'other < 6 and name > 5', [e, e2] )
@param depends a list of dialog fields that should trigger this to be re-evaluated.
Generally, any name you use in your expression should be represented
by the field object (such as Entry) that corresponds to that name in
the depends list. Failing to do so will cause this disabler to be re-evaluated
less often than it should and it may not appear disabled/enabled at
all of the appropriate times.
Reimplemented from dialog.entry.BareEntry.
def JoistMemberCore.Setup.Choose.DisableOtherIf |
( |
|
args | ) |
|
Disable a different item if expression is true
@warning This rule can be tricky in the sense that if the field
being disabled is disabled because of a field other than
this one this rule won't be run. So you'll need to attach
your disable logic to any field which affects your disable
logic.
@param expression Must be a string representing a python
expression which returns True or False. True
indicating that you should disable the item for now.
False indicating that you shouldn't.
You may use, as variable names, any field name
within the model.
Example:
dlg = Dialog()
e = dlg.entry( 'name', 5 )
e2 = dlg.entry( 'other', 6 )
e2.DisableOtherIf( e, 'other < 6 and name > 5' )
Reimplemented from dialog.entry.BareEntry.
def JoistMemberCore.Setup.Choose.DoState |
( |
|
args | ) |
|
def JoistMemberCore.Setup.Choose.EnableIf |
( |
|
args | ) |
|
def JoistMemberCore.Setup.Choose.EnableOtherIf |
( |
|
args | ) |
|
def JoistMemberCore.Setup.Choose.entry |
( |
|
args | ) |
|
@param name The name of this field
@param initial_value This is the default value to start with
if a model is not provided to the dialog.
@param label a string to display in a label to the left of
the entry box
@param width
@param length
@param kind If you do not provide an initial_value then you
must provide this. @see kind module documentation
@return the entry.Entry object
Reimplemented from dialog.entry.BareEntry.
def JoistMemberCore.Setup.Choose.EvaluateValid |
( |
|
args | ) |
|
override this to do something when your widget becomes invalid
by proxy via an item under it which is invalid
Reimplemented from dialog.entry.BareEntry.
def JoistMemberCore.Setup.Choose.file |
( |
|
args | ) |
|
def JoistMemberCore.Setup.Choose.file_save |
( |
|
args | ) |
|
def JoistMemberCore.Setup.Choose.Find |
( |
|
args | ) |
|
This recursively searches the tree, from here down
for things which match query.
@param query A function which returns True or False
It is passed on argument, which is an Item
@note Example use is find_type
Reimplemented from dialog.entry.BareEntry.
def JoistMemberCore.Setup.Choose.find_type |
( |
|
args | ) |
|
This recursively searches the tree, from here down, for a type t.
Example, to find all Fields:
item.find_type( Field )
Reimplemented from dialog.entry.BareEntry.
def JoistMemberCore.Setup.Choose.frame |
( |
|
args | ) |
|
def JoistMemberCore.Setup.Choose.func |
( |
|
args | ) |
|
def JoistMemberCore.Setup.Choose.func |
( |
|
args | ) |
|
def JoistMemberCore.Setup.Choose.get_label_width |
( |
|
args | ) |
|
def JoistMemberCore.Setup.Choose.GetWidget |
( |
|
args | ) |
|
Use this function to retrive tk widgets created by
this object with the name 'name'.
Use `list_widgets` to get a list of names for
this object.
Reimplemented from dialog.entry.BareEntry.
def JoistMemberCore.Setup.Choose.Grid |
( |
|
args | ) |
|
def JoistMemberCore.Setup.Choose.group |
( |
|
args | ) |
|
def JoistMemberCore.Setup.Choose.group_end |
( |
|
args | ) |
|
def JoistMemberCore.Setup.Choose.group_end |
( |
|
args | ) |
|
def JoistMemberCore.Setup.Choose.group_title |
( |
|
args | ) |
|
def JoistMemberCore.Setup.Choose.HasContext |
( |
|
args | ) |
|
def JoistMemberCore.Setup.Choose.image |
( |
|
args | ) |
|
Add an image object.
@param path should be the path to an existing image in the filesystem.
@return the image.Image object
Reimplemented from dialog.entry.BareEntry.
def JoistMemberCore.Setup.Choose.IsEnabled |
( |
|
args | ) |
|
def JoistMemberCore.Setup.Choose.item_valid |
( |
|
args | ) |
|
def JoistMemberCore.Setup.Choose.kind |
( |
|
args | ) |
|
def JoistMemberCore.Setup.Choose.label |
( |
|
args | ) |
|
def JoistMemberCore.Setup.Choose.label_width |
( |
|
args | ) |
|
def JoistMemberCore.Setup.Choose.lframe |
( |
|
args | ) |
|
def JoistMemberCore.Setup.Choose.line |
( |
|
args | ) |
|
def JoistMemberCore.Setup.Choose.list_widgets |
( |
|
args | ) |
|
For debugging, this function gives you a list
of names to pass to GetWidget.
Reimplemented from dialog.entry.BareEntry.
def JoistMemberCore.Setup.Choose.listbox |
( |
|
args | ) |
|
def JoistMemberCore.Setup.Choose.menu |
( |
|
args | ) |
|
Creates a combobox widget
@param name The name of this field
@param values The list of items in the checkbox, these will
be displayed to the user.
@param initial_value This should be a list of strings or indexes to
be checked on corresponding to the values list.
@param label a string to display in a label to the left of
the entry box
@param editable If this is True the menu will allow the user to type
in strings that do not match any strings in your list.
@return the combobox.Combobox object
Reimplemented from dialog.entry.BareEntry.
def JoistMemberCore.Setup.Choose.mixed |
( |
|
args | ) |
|
def JoistMemberCore.Setup.Choose.mtrl_browse |
( |
|
args | ) |
|
def JoistMemberCore.Setup.Choose.name |
( |
|
args | ) |
|
return the name inside the display model that this Field represents.
Reimplemented from dialog.entry.BareEntry.
def JoistMemberCore.Setup.Choose.no_pack |
( |
|
args | ) |
|
def JoistMemberCore.Setup.Choose.nudge |
( |
|
args | ) |
|
def JoistMemberCore.Setup.Choose.OnChange |
( |
|
args | ) |
|
Whenever an event occurs on this value we want to perform action.
@param action This is a function which takes a dictionary.
Expect the dictionary, when called, to contain
a dictionary under key 'model'. That dictionary
will contain values for each field by name.
Most likely you'll want to use the assign function
found in dialog.rules.
Reimplemented from dialog.entry.BareEntry.
def JoistMemberCore.Setup.Choose.Pack |
( |
|
args | ) |
|
The same as ".widget.pack( ... )"
Prefer using this function as it's compatibility with the no_pack
option avoids breaking others use of grid with your widget.
Reimplemented from dialog.entry.BareEntry.
def JoistMemberCore.Setup.Choose.PackForget |
( |
|
args | ) |
|
The same as ".widget.pack_forget()"
Prefer using this function as it's compatibility wi th the no_pack
option avoids breaking others use of grid with your widget.
Reimplemented from dialog.entry.BareEntry.
def JoistMemberCore.Setup.Choose.PackInfo |
( |
|
args | ) |
|
The same as ".widget.pack_info()"
Prefer using this function as it's compatibility wi th the no_pack
option avoids breaking others use of grid with your widget.
Reimplemented from dialog.entry.BareEntry.
def JoistMemberCore.Setup.Choose.PackSlaves |
( |
|
args | ) |
|
The same as ".widget.pack_slaves()"
Prefer using this function as it's compatibility wi th the no_pack
option avoids breaking others use of grid with your widget.
Reimplemented from dialog.entry.BareEntry.
def JoistMemberCore.Setup.Choose.parent |
( |
|
args | ) |
|
def JoistMemberCore.Setup.Choose.PopupValidate |
( |
|
args | ) |
|
This validation gives a similar look and feel to other SDS/2 validation
which uses a focus loop to require the user to immediately fix their
entered value. When they enter something invalid an alert pops up
after they attempt to leave the field.
@param action A function which takes one argument. That argument
will be the Field object. Use the "Get" method to
get the current value of the field. Return False
if you want the popup to occur.
@param reason A string to be displayed to the user indicating why
their value isn't valid.
Reimplemented from dialog.entry.BareEntry.
def JoistMemberCore.Setup.Choose.radio |
( |
|
args | ) |
|
Creates a set of radio buttons.
@param name The name of this field
@param values The list of items in the radio button, these will
be displayed to the user.
@param initial_value This should be a list of strings or indexes to
be checked on corresponding to the values list.
@param label a string to display in a label to the left of
the entry box
@return the radio.Radio object
Reimplemented from dialog.entry.BareEntry.
def JoistMemberCore.Setup.Choose.read |
( |
|
args | ) |
|
This method is for testing. It is intended to be as similar
as possible to reading the value directly off the widget.
So don't bother typing stuff, just return a str or int or
whatever is the native type for your widget.
Or leave it undefined.
Reimplemented from dialog.entry.BareEntry.
def JoistMemberCore.Setup.Choose.read_only |
( |
|
args | ) |
|
def JoistMemberCore.Setup.Choose.RemoveStateFunction |
( |
|
args | ) |
|
def JoistMemberCore.Setup.Choose.root |
( |
|
args | ) |
|
This actually searches up the tree for a model root because this can change as the dialog is being built.
Reimplemented from dialog.entry.BareEntry.
def JoistMemberCore.Setup.Choose.rules |
( |
|
args | ) |
|
Returns a list of all of the current rule skeletons.
These will be tuples of types and arguments intended for constructing each type. Generally intended for internal use.
Reimplemented from dialog.entry.BareEntry.
def JoistMemberCore.Setup.Choose.RunDialog |
( |
|
args | ) |
|
def JoistMemberCore.Setup.Choose.screen_only |
( |
|
args | ) |
|
def JoistMemberCore.Setup.Choose.scrollbar |
( |
|
args | ) |
|
def JoistMemberCore.Setup.Choose.Set |
( |
|
args | ) |
|
Set the value associated with this field. Keep in mind that
multiple fields could share one Value. Calling this on one field
will cause all fields sharing the same name (with the exclusion
of the special name None) to be set to the given value val.
If you're looking to do this in a callback on Modified it is recommended
that you reconsider what you're doing. You are likely to be breaking
multi edit compatibility. The Always rule is likely what you need,
and you should not be calling set from any ValueRule.
Reimplemented from dialog.entry.BareEntry.
def JoistMemberCore.Setup.Choose.set_label_width |
( |
|
args | ) |
|
def JoistMemberCore.Setup.Choose.SetEnabled |
( |
|
args | ) |
|
def JoistMemberCore.Setup.Choose.SetValid |
( |
|
args | ) |
|
Call this to set invalid or valid this Item. It will keep
count of valid=True and valid=False. So, if you call this
3 times with valid=False and 1 time with valid=True it will
still be invalid.
It is up to the caller to make sure they even those calls out.
Consider your default state to be valid=True. Calling valid=True,
then valid=False will yield valid.
@param valid True or False "True" meaning that we are currently
in a valid state. "False" meaning invalid.
@warning This is intended for class implementors. There are
Modified and Validate rules for dialog creators.
Reimplemented from dialog.entry.BareEntry.
def JoistMemberCore.Setup.Choose.SetWidget |
( |
|
args | ) |
|
This is really an internal function, but,
if you're careful not to use already existing
names you can use it to store widgets you've
added to this object to customize it.
Beware that future changes to SDS/2 could
use the same name you've chosen.
Reimplemented from dialog.entry.BareEntry.
def JoistMemberCore.Setup.Choose.show_affects |
( |
|
args | ) |
|
def JoistMemberCore.Setup.Choose.show_button_stuff |
( |
|
args | ) |
|
def JoistMemberCore.Setup.Choose.tab |
( |
|
args | ) |
|
def JoistMemberCore.Setup.Choose.table |
( |
|
args | ) |
|
def JoistMemberCore.Setup.Choose.table_column |
( |
|
args | ) |
|
def JoistMemberCore.Setup.Choose.table_end |
( |
|
args | ) |
|
def JoistMemberCore.Setup.Choose.tabset_begin |
( |
|
args | ) |
|
def JoistMemberCore.Setup.Choose.tabset_end |
( |
|
args | ) |
|
def JoistMemberCore.Setup.Choose.text |
( |
|
args | ) |
|
def JoistMemberCore.Setup.Choose.Update |
( |
|
args | ) |
|
Calling this will force the widget to update its representation
of the current value. Useful if you believe the underlying
value has changed but the widget hasn't shown the change yet.
Reimplemented from dialog.entry.BareEntry.
def JoistMemberCore.Setup.Choose.UpdateDisplay |
( |
|
args | ) |
|
Calling this will force the widget to update its representation
of the current value. Useful if you believe the underlying
value has changed but the widget hasn't shown the change yet.
@warning Generally only for class implementors. It's better to call
Update.
Reimplemented from dialog.entry.BareEntry.
def JoistMemberCore.Setup.Choose.valid |
( |
|
args | ) |
|
def JoistMemberCore.Setup.Choose.Validate |
( |
|
args | ) |
|
This is for telling a user when they've entered a value that your
code will not accept, or simply does not make sense. The user
will not be able to click okay on a dialog that contains any values
which a Validate rule marks as invalid.
@param expression A string expression (see DisableOtherIf) which is True
if the field is valid.
@param reason A string to be displayed to the user indicating why
their value isn't valid.
Reimplemented from dialog.entry.BareEntry.
def JoistMemberCore.Setup.Choose.ValidateRange |
( |
|
args | ) |
|
Similar to validate, but you simply give a minimum and maximum
float value for any int, float, or DimensionStyled field.
Reimplemented from dialog.entry.BareEntry.
def JoistMemberCore.Setup.Choose.WatchState |
( |
|
args | ) |
|
Have this function called when this widget is enabled/disabled.
@param foo This is a function which takes one argument, 'enabled'
Reimplemented from dialog.entry.BareEntry.
def JoistMemberCore.Setup.Choose.widget |
( |
|
args | ) |
|
def JoistMemberCore.Setup.Choose.widget_state |
( |
|
args | ) |
|
def JoistMemberCore.Setup.Choose.widget_valid |
( |
|
args | ) |
|
def JoistMemberCore.Setup.Choose.WidgetExists |
( |
|
args | ) |
|
This is useful if you're having problems with accessing widgets
that have been deleted. It's for debugging purposes.
@return True if the widget (.widget) does exist in the interpreter.
Reimplemented from dialog.entry.BareEntry.
def JoistMemberCore.Setup.Choose.width |
( |
|
args | ) |
|
Member Data Documentation
JoistMemberCore.Setup.Choose.__Load__ = None |
|
staticprivate |
JoistMemberCore.Setup.Choose.__Store__ = None |
|
staticprivate |
JoistMemberCore.Setup.Choose.Context = None |
|
static |
list JoistMemberCore.Setup.Choose.CurrentContainer = [] |
|
static |
JoistMemberCore.Setup.Choose.CurrentlyEnabled = True |
|
static |
JoistMemberCore.Setup.Choose.Enabled = True |
|
static |
JoistMemberCore.Setup.Choose.Extras = None |
|
static |
JoistMemberCore.Setup.Choose.InitializedLabelWidth = False |
|
static |
int JoistMemberCore.Setup.Choose.Label_width = 0 |
|
static |
tuple JoistMemberCore.Setup.Choose.RuleRegistry = ((<function <lambda>>, <function <lambda>>),) |
|
static |
JoistMemberCore.Setup.Choose.Rules = None |
|
static |
JoistMemberCore.Setup.Choose.SB_Clear = False |
|
static |
JoistMemberCore.Setup.Choose.WatchChild = None |
|
static |