DriveWorks Pro 15: How To: Reference Control Properties (KB16010601) [send feedback...]

How To: Reference Control Properties

There are two types of control property. These can be categorized into how the property is referenced (when used in a rule).

  • Direct Reference
  • Hierarchical Reference

The difference between the two is in how the property is referenced.

Applying the MyName() function directly on these properties will return the property reference.

Direct Referencing

The control properties that are most commonly used in rules can be referenced directly from the rules builder.

When the property is selected the control name is given a prefix that corresponds to the property.

The table below shows the available direct referenced properties and their prefixes:

Property ReferenceTypeExample Return Value
ControlNameEnabledBooleanTrue
ControlNameErrorNumeric4
ControlNameListDataStringOption A|Option B|Option C
ControlNameMaxNumeric32500
ControlNameMinNumeric17500
ControlNameReturnBy control typeReturns the current value of the control as entered on the user form
ControlNameVisibleBooleanTrue

Hierarchical Referencing

For all other control properties a hierarchical reference is used when the property value is required in a rule.

These properties can be selected from the rules builder intellisense or typed into the rule editor.

Hierarchical properties require a point separator between the control name and the property, for example:

ControlName.PropertyName

For example, to obtain the value of the height property of a control named ProductOptions, the reference used in the rule would be:

ProductOptions.height

Property References By Category

The following tables list the references available for each property.

Appearance Properties

Property NameHierarchical ReferenceAvailable for Form ControlsExample Return Value
Background ColorControlName.BackgroundColorAll ControlsWhite or #ffffff
Border StyleControlName.BorderStylePicture Box, 3D Preview BoxInset3D
CaptionControlName.CaptionCheckbox, Combo Box, Date Picker, List Box, Numeric Text Box, Option Button, Spin Button, Text Box, Child Specification List, Data Grid, Item List, Measurement Text Box, Option GroupThe caption of the named control
Caption ColorControlName.CaptionColorCheckbox, Combo Box, Date Picker, List Box, Numeric Text Box, Option Button, Spin Button, Text Box, Child Specification List, Data Grid, Item List, Measurement Text Box, Option GroupWhite or #ffffff
Caption FontControlName.CaptionFontCheckbox, Combo Box, Date Picker, List Box, Numeric Text Box, Option Button, Spin Button, Text Box, Child Specification List, Data Grid, Item List, Measurement Text Box, Option Groupfont-family: Microsoft Sans Serif; font-size: 12pt; font-weight: bold; text-decoration:
Caption Horizontal AlignmentControlName.CaptionHorizontalAlignmentCheckbox, Combo Box, Date Picker, List Box, Numeric Text Box, Option Button, Spin Button, Text Box, Child Specification List, Data Grid, Item List, Measurement Text Box, Option GroupLeft
Check AlignmentControlName.CheckAlignmentCheckboxLeft
Column WidthControlName.ColumnWidthData Table, Child Specification List, Item List200
FontControlName.FontData Table, Date Picker, Hyperlink, Label, Numeric Text Box, Slider, Spin Button, Text Box, Dialog Button, Macro Button, Measurement Text Box, Upload Controlfont-family: Microsoft Sans Serif; font-size: 12pt; font-weight: bold; text-decoration:
Header Background ColorControlName.HeaderBackgroundColorData TableWhite or #ffffff
Header FontControlName.HeaderFontData Table, Child Specification List, Item Listfont-family: Microsoft Sans Serif; font-size: 12pt; font-weight: bold; text-decoration:
Header Text ColorControlName.HeaderTextColorData Table, Child Specification List, Item ListWhite or #ffffff
Header Text Horizontal AlignmentControlName.HeaderTextHorizontalAlignmentData TableLeft
Header Text Vertical AlignmentControlName.HeaderTextVerticalAlignmentData TableCenter
Hide CharactersControlName.HideCharactersText BoxTrue
Hover ColorControlName.HoverColorHyperlinkWhite or #ffffff
Hover UnderlineControlName.HoverUnderlineHyperlinkTrue
Input Background ColorControlName.InputBackgroundColorNumeric Text Box, Text BoxWhite or #ffffff
List Item ColorControlName.ListItemColorCombo Box, List Box, Child Specification List, Item ListWhite or #ffffff
List Item FontControlName.ListItemFontCombo Box, List Box, Child Specification List, Item Listfont-family: Microsoft Sans Serif; font-size: 12pt; font-weight: bold; text-decoration:
MultilineControlName.MultilineText BoxTrue
Name Column VisibleControlName.NameColumnVisibleChild Specification List, Item ListTrue
Number of RowsControlName.NumberofRowsOption Group5
Option AlignmentControlName.OptionAlignmentOption Button, Option GroupLeft
Option Item ColorControlName.OptionItemColorOption GroupWhite or #ffffff
Option Item FontControlName.OptionItemFontOption Groupfont-family: Microsoft Sans Serif; font-size: 12pt; font-weight: bold; text-decoration:
Option Text Horizontal AlignmentControlName.OptionTextHorizontalAlignmentOption GroupLeft
OrientationControlName.OrientationSliderHorizontal
PictureControlName.PictureDefaultCheckbox, Hyperlink, Option Button, Dialog Button, Macro Button, Option Group, Upload ControlImages\CompanyLogo.jpg
Picture (Checked)ControlName.PictureCheckedCheckboxImages\CompanyLogo.jpg
Picture (Hover)ControlName.PictureHoverHyperlink, Dialog Button, Macro Button, Upload ControlImages\CompanyLogo.jpg
Picture (Pressed)ControlName.PicturePressedDialog Button, Macro Button, Upload ControlImages\CompanyLogo.jpg
Picture (Selected)ControlName.PictureSelectedOption GroupImages\CompanyLogo.jpg
Picture Size ModeControlName.PictureSizeModeCheckbox, Hyperlink, Option Button, Dialog Button, Macro Button, Option Group, Upload ControlStretchImage
Picture StyleControlName.PictureStyleCheckbox, Hyperlink, Option Button, Dialog Button, Macro Button, Option Group, Upload ControlTextAndPicture
Reverse DirectionControlName.ReverseDirectionSliderTrue
Row Background ColorControlName.RowBackgroundColorData TableWhite or #ffffff
Row HeightControlName.RowHeightData Table30
Row Hover Background ColorControlName.RowHoverBackgroundColorData TableWhite or #ffffff
Row Hover Text ColorControlName.RowHoverTextColorData TableWhite or #ffffff
Row Text Horizontal AlignmentControlName.RowTextHorizontalAlignmentData TableLeft
Row Text Vertical AlignmentControlName.RowTextVerticalAlignmentData TableCenter
Selected Row Background ColorControlName.SelectedRowBackgroundColorData TableDodgerBlue
Selected Row FontControlName.SelectedRowFontData Tablefont-family: Microsoft Sans Serif; font-size: 12pt; font-weight: bold; text-decoration:
Selected Row Text ColorControlName.SelectedRowTextColorData TableWhite
Show BorderControlName.ShowBorderNumeric Text Box, Text Box, Option GroupTrue
Show CheckControlName.ShowCheckCheckboxTrue
Show Grid LinesControlName.ShowGridLinesData TableTrue
Show LimitsControlName.ShowLimitsSliderTrue
Show OptionControlName.ShowOptionOption Button, Option GroupTrue
Size ModeControlName.SizeModePicture BoxStretchImage
State Column VisibleControlName.StateColumnVisibleChild Specification ListTrue
TextControlName.TextSlider, Dialog Button, Macro Button, Upload Control
Text ColorControlName.TextColorDate Picker, Hyperlink, Label, Numeric Text Box, Slider, Spin Button, Text Box, Dialog Button, Macro Button, Measurement Text Box, Upload ControlWhite or #ffffff
Text Horizontal AlignmentControlName.TextHorizontalAlignmentDate Picker, Hyperlink, Label, Numeric Text Box, Spin Button, Text Box, Dialog Button, Macro Button, Measurement Text Box, Upload ControlLeft
Text UnderlineControlName.TextUnderlineHyperlinkTrue
Thumb ImageControlName.ThumbImageSliderImages\arrow.png
Track ColorControlName.TrackColorSlider#e7eaea
Type Column VisibleControlName.TypeColumnVisibleChild Specification List, Item ListTrue
Unit ColorControlName.UnitColorMeasurement Text BoxWhite or #ffffff
Unit FontControlName.UnitFontMeasurement Text Boxfont-family: Microsoft Sans Serif; font-size: 12pt; font-weight: bold; text-decoration:
Word WrapControlName.WordWrapText BoxFalse

Autopilot Mode Properties (3D Preview Control)

Property NameHierarchical ReferenceAvailable for Form ControlsExample Return Value
Generation MethodControlName.GenerationMethod3D Preview ControlOnDemand
TagsControlName.Tags3D Preview ControlHigh Priority
TimeoutControlName.Timeout3D Preview Control2
Use Relative Path RulesControlName.UseRelativePathRules3D Preview ControlTrue
Use SOLIDWORKS Extension SuffixControlName.UseSWExtensionSuffix3D Preview ControlFalse

Behavior Properties

Property NameHierarchical ReferenceAvailable for Form ControlsExample Return Value
BehaviorControlName.BehaviorChild Specification ListMultipleChildren
Character LimitControlName.CharacterLimitText Box0
CheckedControlNameReturn (Direct Reference)CheckboxFalse
Checked (Override Rule)ControlNameReturn (Direct Reference)CheckboxFalse
Clear Selection AllowedControlName.ClearSelectionAllowedCombo Box, List Box, Option Button, Option GroupTrue
Database - Please refer to the topic Data Grid for more information.ControlName.DatabaseData Grid
DateControlNameReturn (Direct Reference)Date Picker08/01/2016
Date (Override Rule)ControlNameReturn (Direct Reference)Date Picker08/01/2016
Date FormatControlNameDefaultDate Pickerdd/MM/yyyy
Decimal PlacesControlName.DecimalPlacesNumeric Text Box, Spin Button, Measurement Text Box-1
Default File NameControlNameDefault (Direct Reference)Upload Control\\DriveWorks\ProjectName\Images\OriginalName.jpg
Default Rotation-ZoomControlName.DefaultRotationZoomValue3D Preview Box90|45|50
Default Row IdentityControlName.DefaultRowIdentityData TableAcme Co.
Default Row IndexControlName.DefaultRowIndexData Table3
Default ValueControlName.DefaultValueCheckbox, Combo Box, Date Picker, List Box, Numeric Text Box, Slider, Spin Button, Text Box, Option GroupTrue
Dialog NameControlNameReturn (Direct Reference)Dialog ButtonDetails
Disply UnitsControlName.DisplyUnitsMeasurement Text BoxMillimeters
Display ValueControlNameReturn (Direct Reference)Numeric Text Box, Measurement Text Box2575
Duplicate File BehaviorControlName.DuplicateFileBehaviorUpload ControlOverwrite
Enable AnimationsControlName.EnableMenu3D Preview BoxTrue
Enable Image ModeControlName.EnableImageMode3D Preview BoxTrue
EnabledControlNameEnabled (Direct Reference)All Controlstrue
Error ResultControlNameError (Direct Reference)All Controls2
Field Names - Please refer to the topic Data Grid for more information.ControlName.FieldNamesData Grid
File FilterControlName.FileFilterUpload ControlImage File:png,jpg|Word File:doc,docx|Excel File:xls
File NameControlName.FileNamePicture Box, 3D Preview BoxMyAssy.drive3d
File Size LimitControlName.FileSizeLimitUpload Control2Mb
Form NameControlName.FormNameFrame ControlDesign Info
Group NameControlName.GroupNameOption ButtonOptions
Hidden FieldsControlName.HiddenFieldsData TableID|Name|Type
Hidden Item ValuesControlName.HiddenItemValuesItem ListServicePlan|Spares
Hidden Result ColumnsControlName.HiddenResultColumnsChild Specification ListCost|Margin
Horizontal Scroll VisibilityControlName.HorizontalScrollVisibilityFrame ControlHidden
HyperlinkControlNameReturn (Direct Reference)Hyperlinkwww.driveworks.co.uk
Identity FieldsControlName.IdentityFieldsData TableCustomer
IncrementControlName.IncrementSlider, Spin Button10
Input ValuesControlName.InputValuesSpecification Host{"Name","Value";"Check","TRUE";"Slider","50"}
Items. See Items (Data Table) for the Data Table controlControlNameListData (Direct Reference)Combo Box, Data Table, List Box, Item List, Option GroupItem A|Item B|Item C|Item D|Item E|Item F
LightingControlName.Lighting3D Preview BoxHard Lighting
Link BehaviorControlName.LinkBehaviorHyperlinkCurrentWindow
Macro ArgumentControlName.MacroArgumentMacro Button1
Macro NameControlNameReturn (Direct Reference)Macro ButtonCancel
MaximumControlNameMax (Direct Reference)Date Picker, Numeric Text Box, Slider, Spin Button, Text Box, Measurement Text Box3500
MinimumControlNameMin (Direct Reference)Date Picker, Numeric Text Box, Slider, Spin Button, Text Box, Measurement Text Box1200
Native UnitsControlName.NativeUnitsMeasurement Text BoxMillimeters
On Upload Complete MacroControlName.OnUploadCompleteMacroUpload ControlDriveValue
Password - Please refer to the topic Data Grid for more information.ControlName.PasswordData Grid
Preview Document NameControlName.PreviewDocumentName3D Preview BoxMy3DFile
Preview EngineControlName.PreviewEngine3D Preview Box
ProjectsNo hierarchical reference available.Child Specification List
Read OnlyControlName.ReadOnlyText BoxFalse
Selected ItemControlNameReturn (Direct Reference)Combo Box, List Box, Option GroupType A
Selected Item (Override Rule)ControlNameReturn (Direct Reference)Combo Box, List Box, Option GroupType A
Selected Item Removed BehaviorControlName.SelectedItemRemovedBehaviorCombo Box, List Box, Option GroupSelectFirst
Selected OptionControlNameReturn (Direct Reference)Option ButtonType A
Selected Option (Override Rule)ControlNameReturn (Direct Reference)Option ButtonType A
Selected Row IndexControlNameReturn (Direct Reference)Data Table4
Tab IndexControlName.TabIndexAll Controls3
Table Name - Please refer to the topic Data Grid for more information.ControlName.TableNameData Grid
Task List EnabledControlName.TaskListDialog Button, Item ListFalse
Text. See Text (Label Control) for the Label controlControlNameReturn (Direct Reference)Hyperlink, Label, Text BoxDriveWorks
Text (Override Rule)ControlNameReturn (Direct Reference)Text BoxDriveWorks
URLControlName.URLWeb Frame Controlhttp://www.driveworks.co.uk
User Name - Please refer to the topic Data Grid for more information.ControlName.UserNameData Grid
ValueControlNameReturn (Direct Reference)Slider, Spin Button200
Value (override Rule)ControlNameReturn (Direct Reference)Slider, Spin Button200
Vertical Scroll VisibilityControlName.VerticalScrollVisibilityFrame ControlHidden
VisibleControlNameVisible (Direct Reference)All ControlsTrue
Where Clause - Please refer to the topic Data Grid for more information.ControlName.WhereClauseData Grid

Events Properties

Property NameHierarchical ReferenceAvailable for Form ControlsExample Return Value
On Autopilot Preview Requested MacroControlName.AutopilotPreviewRequestedMacroName3D Preview BoxMyMacro
On Background Clicked MacroControlName.BackgroundClickedMacroName3D Preview BoxMyMacro
On Model Clicked MacroControlName.ClickedMacroName3D Preview BoxMyMacro
On Preview Complete MacroControlName.PreviewFinishedMacroName3D Preview BoxMyMacro

General Properties

Property NameHierarchical ReferenceAvailable for Form ControlsExample Return Value
(Name)No hierarchical reference available.To determine the name of the control consider using the function MyNameAll ControlsThe name given to the control
(Tag)ControlName.TagAll ControlsThe tag applied to the control
Tooltip DurationControlName.TooltipDurationCheckbox, Combo Box, Data Table, Date Picker, Hyperlink, Label, List Box, Numeric Text Box, Option Button, Picture Box, Slider, Spin Button, Text Box, 3D Preview Box, Child Specification List, Data Grid, Dialog Button, Frame Control, Item List, Macro Button, Measurement Text Box, Option Group5
Tooltip TextControlName.TooltipTextCheckbox, Combo Box, Data Table, Date Picker, Hyperlink, Label, List Box, Numeric Text Box, Option Button, Picture Box, Slider, Spin Button, Text Box, 3D Preview Box, Child Specification List, Data Grid, Dialog Button, Frame Control, Item List, Macro Button, Measurement Text Box, Option GroupPlease enter the length

Layout Properties

Property NameHierarchical ReferenceAvailable for Form ControlsExample Return Value
Caption WidthControlName.CaptionWidthCombo Box, Date Picker, List Box, Numeric Text Box, Spin Button, Text Box, Measurement Text Box
HeightControlName.HeightAll Controls100
LeftControlName.LeftAll Controls24
TopControlName.TopAll Controls50
WidthControlName.WidthAll Controls350

Knowledge Base Article Ref:KB16010601

Table of Contents