User's Guide > User Interface: Dialogs > UI Components > Adding and Removing Components
Adding and Removing Components
Component Name
Add Function
Remove Function
Checkbutton
ProUIDialogCheckbuttonAdd()
ProUIDialogCheckbuttonRemove()
Drawingarea
ProUIDialogDrawingareaAdd()
ProUIDialogDrawingareaRemove()
Inputpanel
ProUIDialogInputpanelAdd()
ProUIDialogInputpanelRemove()
Label
ProUIDialogLabelAdd()
ProUIDialogLabelRemove()
Layout
ProUIDialogLayoutAdd()
ProUIDialogLayoutRemove()
List
ProUIDialogListAdd()
ProUIDialogListRemove()
Menubar
ProUIDialogMenubarAdd()
Not Applicable
Menupane
ProUIDialogMenupaneAdd()
ProUIDialogMenupaneRemove()
Optionmenu
ProUIDialogProgressbarAdd()
ProUIDialogOptionmenuRemove()
Progressbar
ProUIDialogProgressbarAdd()
ProUIDialogProgressbarRemove()
Pushbutton
ProUIDialogPushbuttonAdd()
ProUIDialogPushbuttonRemove()
Radiogroup
ProUIDialogRadiogroupAdd()
ProUIDialogRadiogroupRemove()
Separator
ProUIDialogSeparatorAdd()
ProUIDialogSeparatorRemove()
Slider
ProUIDialogSliderAdd()
ProUIDialogSliderRemove()
Spinbox
ProUIDialogSpinboxAdd()
ProUIDialogSpinboxRemove()
Tab
ProUIDialogTabAdd()
ProUIDialogTabRemove()
Table
ProUIDialogTableAdd()
ProUIDialogTableRemove()
Textarea
ProUIDialogTextareaAdd()
ProUIDialogTextareaRemove()
Thumbwheel
ProUIDialogThumbwheelAdd()
ProUIDialogThumbwheelRemove()
Tree
ProUIDialogTreeAdd()
ProUIDialogTreeRemove()
Creo TOOLKIT provides functions to add components to a dialog. These functions accept an argument of type ProUIGridopts that determines the location and initial placement details of the component. In addition, a number of grid-specific attributes control the position and resizing of the newly created component within the grid of the Dialog.
These grid-specific attributes are listed as follows:
Attribute
Default Value
Description
column
PRO_UI_INSERT_NEW_COLUMN
The column of the grid into which the component should be added. A value of PRO_UI_INSERT_NEW_COLUMN indicates that the component should be added to a newly created column to the left of any existing columns.
row
PRO_UI_INSERT_NEW_ROW
The row of the grid into which the component should be added. A value of PRO_UI_INSERT_NEW_ROW indicates that the component should be added to a newly created row to the left of any existing rows.
horz_cells
1
The number of cells which the component should occupy in the existing grid in a horizontal direction.
vert_cells
1
The number of cells which the component should occupy in the existing grid in a vertical direction.
horz_resize
PRO_B_TRUE
A flag indicating whether the grid cell containing the component should resize horizontally.
vert_resize
PRO_B_TRUE
A flag indicating whether the grid cell containing the component should resize vertically.
attach_top
PRO_B_TRUE
Attach the item to the top neighbor
attach_bottom
PRO_B_TRUE
Attach the item to the bottom neighbor
attach_left
PRO_B_TRUE
Attach the item to the left neighbor
attach_right
PRO_B_TRUE
Attach the item to the right neighbor
top_offset
PRO_UI_USE_DEVICE_OFFSET
Offset to the top neighbor. The default value PRO_UI_USE_DEVICE_OFFSET inherits the offset from the owning dialog.
bottom_offset
PRO_UI_USE_DEVICE_OFFSET
Offset to the bottom neighbor. The default value PRO_UI_USE_DEVICE_OFFSET inherits the offset from the owning dialog.
left_offset
PRO_UI_USE_DEVICE_OFFSET
Offset to the left neighbor. The default value PRO_UI_USE_DEVICE_OFFSET inherits the offset from the owning dialog.
right_offset
PRO_UI_USE_DEVICE_OFFSET
Offset to the right neighbor. The default value PRO_UI_USE_DEVICE_OFFSET inherits the offset from the owning dialog.
Note:
 
Components that are added to a dialog after it is displayed do not permit modification of all component attributes. When creating and displaying a dialog, it is preferable to use these functions to add the components before activating the dialog. If a component might be needed but should not be shown initially, add it before activation and set its .Visible attribute to false.
這是否有幫助?