IDialogFields¶
- class IDialogFields¶
Bases:
ImpactCOMWrapperBase,Iterable- Description:
A colllection of IDialogField objects.
- Remarks:
Use the IDialogFields methods to add various styles of fields to a dialog, and then use the IDialogField properties to change the field behaviour and read the field value.
Wraps a COM object or another wrapper instance. Accepts: - A valid impact_object - An existing impact_com_wrapper_base-derived instance
- property bytes_as_variant¶
Gets bytes_as_variant.
- Description:
Controls how binary data is returned from IDialogField objects,
- Remarks:
Introduced in Impact 11.0.0.11
- Returns:
The value of bytes_as_variant.
- Return type:
bytes_as_variant (bool)
- property count¶
Gets Count.
- Description:
The number of items in this collection.
- Returns:
The value of Count.
- Return type:
count (int)
- add_angle(value, label)¶
- Description:
Adds an angle field to the dialog.
- Parameters:
value (float) – Specifies the initial value of the field.
label (str) – Specifies the label for the field.
- add_area(value, label)¶
- Description:
Adds an area field to the dialog.
- Parameters:
value (float) – Specifies the initial value of the field.
label (str) – Specifies the label for the field.
- add_button(label)¶
- Description:
Add a custom button to the dialog.
- Remarks:
Note that pressing the button does not cause the form to close (unlike buttons added by IDialog.add_button). You can use a button with a callback to perform operations within the dialog. The IDialogField for the button automatically has the use_callback property set to true. Introduced in Impact 11.0.0.11
- Parameters:
label (str) – The text to appear on the button.
- add_check_box(value, label)¶
- Description:
Adds a check box field to the dialog.
- Parameters:
value (bool) – Specifies the initial value of the field.
label (str) – Specifies the label for the field.
- add_combo_box(value, label, items)¶
- Description:
Adds a combo box (or drop down list) field to the dialog.
- Parameters:
value (any) – Specifies the initial value of the field. You may specify an integer representing a zero based index into the list specified by the items parameter or a string that exists in the items parameter.
label (str) – Specifies the label for the field.
items (any) – Specifies a list of strings to display in the combo box.
- Examples:
- add_date(value, label)¶
- Description:
Adds a date field to the dialog.
- Parameters:
value (datetime) – Specifies the initial value of the field.
label (str) – Specifies the label for the field.
- add_distance(value, label, allow_negative)¶
- Description:
Adds a distance field to the dialog.
- Parameters:
value (float) – Specifies the initial value of the field.
label (str) – Specifies the label for the field.
allow_negative (bool) – Specifies if negative values are permitted.
- add_integer(value, label)¶
- Description:
Adds an integer field to the dialog.
- Parameters:
value (int) – Specifies the initial value of the field.
label (str) – Specifies the label for the field.
- add_line(label)¶
- Description:
Adds a field containing a line of text (just a label) to the dialog.
- Remarks:
If the label starts and ends with a hyphen (for example “-Some heading-“), then the text is displayed in bold and with a horizontal line, to denote a section heading.
- Parameters:
label (str) – Specifies the label for the field.
- add_list_box(items, selection, select_multiple, height)¶
- Description:
Adds a list box field to the dialog.
- Parameters:
items (any) – Specifies a list of strings to display in the combo box.
selection (any) – Specifies a list of boolean values to indicate which items should be initially selected. This parameter may be null (nothing in VBScript), in which case no items will be initially selected.
select_multiple (bool) – Specifies if a multiple selection is permitted.
height (int) – Specifies the height of the list box. This value must be in the range of 0 to 20. If the specified value falls outside of this range it will be modified accordingly.
- add_picture(value, label, options)¶
- Description:
Adds an image field to the dialog.
- Remarks:
The Value parameter can be either a string (a file path to an image) or a VARIANT array (of VARIANT’s or bytes) for a BLOB value. The Label parameter is optional, if no Label is supplied then the picture control is left aligned on the dialog. This can be useful for larger picture controls. Introduced in Impact 11.0.0.11
- Parameters:
value (any) – The image to be displayed. For example a string containing a file location.
label (str) – Optional label text.
options (IDialogPictureOptions) – Various options for the picture control
- Examples:
- add_preview(file_path, layer_name, layer_locked, orientation)¶
- Description:
Adds a preview field to the dialog.
- Remarks:
Adding a preview does not make the dialog visible. When the dialog is displayed, you can zoom in and out of the preview, change layers in the preview and print the preview.
- 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.
orientation (ipDialogPreviewOrientation) – Specifies the orientation of the preview in the dialog.
- add_radio_group(value, label, items)¶
- Description:
Adds a radio group field to the dialog.
- Parameters:
value (any) – Specifies the initial value displayed by the field. You may specify an integer representing a zero based index into the list specified by the items parameter or a string that exists in the items parameter.
label (str) – Specifies the label for the field.
items (any) – Specifies a list of strings to display in the radio group.
- add_real(value, label)¶
- Description:
Adds a ‘real’ field to the dialog.
- Parameters:
value (float) – Specifies the initial value of the field.
label (str) – Specifies the label for the field.
- add_text(value, label)¶
- Description:
Adds a text field to the dialog, to display a single line of text.
- Parameters:
value (str) – Specifies the initial value of the field.
label (str) – Specifies the label for the field.
- add_text_box(value, label)¶
- Description:
Adds a text box field to the dialog, to display multiple lines of text.
- Parameters:
value (str) – Specifies the initial value of the field.
label (str) – Specifies the label for the field.
- add_time(value, label)¶
- Description:
Adds a time field to the dialog.
- Parameters:
value (datetime) – Specifies the initial value of the field.
label (str) – Specifies the label for the field.
- add_twin_list(left_label, right_label, items, selection, height)¶
- Description:
Adds a twin list field to the dialog.
- Parameters:
left_label (str) – Specifies the label for the left hand list of items.
right_label (str) – Specifies the label for the right hand list of items.
items (any) – Specifies a list of strings to display in the twin list.
selection (any) – Specifies a list of boolean values to indicate which items should be initially selected (displayed on the right hand side of the twin list). This parameter may be null (nothing in VBScript), in which case no items will be initially selected.
height (int) – Specifies the height of the twin list. This value must be in the range of 6 to 20. If the specified value falls outside of this range it will be modified accordingly.
- add_volume(value, label)¶
- Description:
Adds a volume field to the dialog.
- Parameters:
value (float) – Specifies the initial value of the field.
label (str) – Specifies the label for the field.
- add_weight(value, label)¶
- Description:
Adds a weight field to the dialog.
- Parameters:
value (float) – Specifies the initial value of the field.
label (str) – Specifies the label for the field.
- item(index)¶
- Description:
Gets an IDialogField object from this collection with the specified label or index.
- Parameters:
index (any) – Specifies the label or index of the item to get.