UIDropdown is a graphical control element that allows the user to choose one value from a list. When activated, it displays (drops down) a list of values, from which the user may select one.
The list is an array of strings, numbers or Integers:
["Oak", "Birch", "Cherry", "Walnut"] |
[100,200,300,400,500] |
[1,2,3,4,5] |
Parameter Rules
bindParent: | This the refChain to the design where your target resides. |
Example: | R.rootModel |
bindTarget: | The target is the name of the rule you want as the target. |
Example: | "MaterialSelectedTable" |
choices: This is where you enter your list of choices, enclosed with square brackets [ ].
Example: ["Oak", "Birch", "Cherry", "Walnut"]
sequenceNo: | This is the sorting number within the UIContainer or UIFieldset that the design will appear. |
Example: | 1 |
title: | This sets the title if desired. Leave blank if title is not needed. |
Example: | "Material Selection:" |
editable: | If the value is true then the User can type in the value, if false then the user must select from the list. |
Example: | false |
Mixins
UITitleMixin
UIInputMixin
UIStyleMixin
BaseNode
BaseModel
RULE NAME |
TYPE |
DEFAULTS |
CATEGORY |
FLAGS |
---|---|---|---|---|
bindParent |
any |
undefined |
UI |
Cached |
bindTarget |
string |
“” |
UI |
Cached |
choices |
array |
[] |
UI |
Cached |
sequenceNo |
number |
0 |
UI |
Cached |
title |
string |
“” |
UI |
Cached
|
editable |
boolean |
false |
UI |
Cached |
Project Example:
In your kBridge Examples Projects folder open the project called ‘MyTable’.
Reference Location:
“world.mytable.tableui.tableui0.inputscontainer.inputscontainer0.contentfieldset.contentfieldset0.contentpanel.contentpanel0.contentcontainer.contentcontainer0.materialfieldset.materialfieldset0.materialdropdown.materialdropdown0”
Link: https://knowledgebridge.engineer/projects
Open the MyTable project.
Press the UI start icon to start the User Interface.
A rule was created in the root (MyTable) called ‘MaterialSelectedTable’ which is a string type with a default of ‘Birch’. When a material is selected in the UI it sets the ‘MaterialSelectedTable’ to the chosen material.
In the example image below, “Oak” was selected and you can tell that the rule is getting its value from the UI by the ‘world.mytable’ in the Owner column. Also the text in in bold.