IDialogField¶
- class IDialogField¶
Bases:
ImpactCOMWrapperBase- Description:
Represents a field displayed in a dialog window.
Wraps a COM object or another wrapper instance. Accepts: - A valid impact_object - An existing impact_com_wrapper_base-derived instance
- property allow_negative¶
Gets allow_negative.
- Description:
Gets and sets if negative values are permitted in a distance field.
- Remarks:
This property is only applicable to a distance field. An attempt to read or write this property on any other type of field will result in an error.
- Returns:
The value of allow_negative.
- Return type:
allow_negative (bool)
- property case¶
Gets Case.
- Description:
Gets and sets the case that characters of a text field are displayed in.
- Remarks:
This property is only applicable to text a field. An attempt to read or write this property on any other type of field will result in an error.
- Returns:
The value of Case.
- Return type:
- property chars¶
Gets Chars.
- Description:
Gets and sets the types of characters that are permitted in a text field.
- Remarks:
This property is only applicable to text a field. An attempt to read or write this property on any other type of field will result in an error.
- Returns:
The value of Chars.
- Return type:
- property dialog¶
Gets Dialog.
- Description:
Gets the dialog this field is displayed in.
- property enabled¶
Gets Enabled.
- Description:
Gets and sets the enabled status of a field.
- Returns:
The value of Enabled.
- Return type:
enabled (bool)
- property field_indent¶
Gets field_indent.
- Description:
Gets and sets the amount to indent the field control from the left hand side of the dialog.
- Remarks:
This value must be in the range of 0 to 10. If the specified value falls outside of this range it will be modified accordingly. An attempt to set this property while the dialog is showing will result in an error.
- Returns:
The value of field_indent.
- Return type:
field_indent (int)
- property field_type¶
Gets field_type.
- Description:
Gets the type of this field.
- Returns:
The value of field_type.
- Return type:
- property height¶
Gets Height.
- Description:
Gets and sets the height of a text box, a list box or twin list field.
- Remarks:
This property is applicable to a list box or twin list field. From Impact 11.0.0.25, you can also change the height of a text box. Allowable values are 3 to 20 (and invalid values will be set to the nearest allowed value, so setting the height to 1 will result in a height of 3). An attempt to read or write this property on any other type of field will result in an error. An attempt to set this property while the dialog is showing will result in an error.
- Returns:
The value of Height.
- Return type:
height (int)
- property hint¶
Gets Hint.
- Description:
An optional hint message that displays when the cursor hovers over the field.
- Remarks:
Introduced in Impact 11.0.0.11
- Returns:
The value of Hint.
- Return type:
hint (str)
- property label¶
Gets Label.
- Description:
Gets and sets the label displayed by a field.
- Remarks:
An attempt to set this property while the dialog is showing will result in an error.
- Returns:
The value of Label.
- Return type:
label (str)
- property label_indent¶
Gets label_indent.
- Description:
Gets and sets the amount to indent the field label from the left hand side of the dialog.
- Remarks:
This value must be in the range of 0 to 10. If the specified value falls outside of this range it will be modified accordingly. An attempt to set this property while the dialog is showing will result in an error.
- Returns:
The value of label_indent.
- Return type:
label_indent (int)
- property max_length¶
Gets max_length.
- Description:
Gets and sets the maximum length of the text field.
- Remarks:
This value must be between 0 and 1000. If 0 is specified the default length is used, currently this is 128. This property is only applicable to text a field. An attempt to read or write this property on any other type of field will result in an error.
- Returns:
The value of max_length.
- Return type:
max_length (int)
- property picture_file_name¶
Gets picture_file_name.
- Description:
Used to determine if a picture control has an image assigned that was loaded from a file.
- Remarks:
You can use the image file name directly if required. However if you have configured the picture to automatically resize assigned images then you should use IDialogField.value to retrieve the new image. Introduced in Impact 11.0.0.11
- Returns:
The value of picture_file_name.
- Return type:
picture_file_name (str)
- property picture_has_image¶
Gets picture_has_image.
- Description:
Used to determine if a picture control has an image assigned.
- Remarks:
If an image has been cleared then this property will be false. Introduced in Impact 11.0.0.11
- Returns:
The value of picture_has_image.
- Return type:
picture_has_image (bool)
- property selected_indices¶
Gets selected_indices.
- Description:
Gets the indices of the selected items in a list box or twin list field.
- Remarks:
This property is only applicable to a list box or twin list field. An attempt to read this property on any other type of field will result in an error.
- Returns:
The value of selected_indices.
- Return type:
selected_indices (any)
- property selected_item¶
Gets selected_item.
- Description:
Gets the selected string value for a combo box or radio group field.
- Remarks:
This property is only applicable to a combo box or radio group field. An attempt to read this property on any other type of field will result in an error.
- Returns:
The value of selected_item.
- Return type:
selected_item (str)
- property selected_items¶
Gets selected_items.
- Description:
Gets the string values of the selected items in a list box or twin list field.
- Remarks:
This property is only applicable to a list box or twin list field. An attempt to read this property on any other type of field will result in an error.
- Returns:
The value of selected_items.
- Return type:
selected_items (any)
- property tag¶
Gets Tag.
- Description:
Gets and sets a custom string.
- Remarks:
This property can be used to associate any custom data with a field.
- Returns:
The value of Tag.
- Return type:
tag (str)
- property use_callback¶
Gets use_callback.
- Description:
Gets and sets if this field causes a callback to occur.
- Remarks:
This property is not applicable to list box, twin list and preview fields. An attempt to read or write this property on any of these types of field will result in an error.
- Returns:
The value of use_callback.
- Return type:
use_callback (bool)
- property value¶
Gets Value.
- Description:
Gets and sets the value of the field.
- Remarks:
The following list indicates the types which are allowed when setting this property and the type returned when getting this property for each different field type. Boolean Set using a boolean, returns a boolean. Integer Set with an integer, returns an integer. Real, Distance, Angle, Weight, Area or Volume Set with any numeric type, returns a real number. Text or Text Box Set with a string, returns a string. Date Set with a date or valid string representation of a date, returns a date. Time Set with a date or valid string representation of a time, returns a date. Combo Box or Radio Group Set with an integer specifying the zero based index into the items or a string specifying an item in the items. List Box, Twin List, Label or Preview This property is not applicable for these field types.
- Returns:
The value of Value.
- Return type:
value (any)
- make_current()¶
- Description:
Makes this field the active field.
- show_picture(file_path)¶
- Description:
Assigns a new picture to an image control either before or while the dialog is open (from a callback).
- Remarks:
Introduced in Impact 11.0.0.11
- Parameters:
file_path (str) – The path to the image file.
- show_preview(file_path, layer_name, layer_locked)¶
- Description:
Displays the specified file in the preview field.
- Parameters:
file_path (str) – Specifies the full path to the drawing file to display in the preview.
layer_name (str) – Specifies the name of the layer to display.
layer_locked (bool) – If true, prevents the user from changing the displayed layer.