Creating a Property

From Flowcode Help
Jump to navigationJump to search

When a component on the panel is selected the Properties Panel window will be populated with properties associated with that component to allow you to configure the component to your requirements.

When creating a program or a component you may wish to add your own properties to allow you to either simply switch some code in or out of the program or to control a specific feature within your code.

Properties can only be added to the root so to begin you must either click on an empty area of the Dasboard or System Panel, or select the 'Panel' from the drop down menu at the top of the Properties Panel.

Gen Properties Panel Properties Menu.jpg


Clicking the drop down menu next to 'Properties' on the panel properties window will bring up the menu shown above.

The 'Add new' option allows a property to be created and pops up the dialogue window below.


Creating Properties

Error creating thumbnail: sh: /usr/bin/convert: No such file or directory Error code: 127

The 'Cosmetic name' is the name label that is shown to the user by the side of the property.

The 'Property type' selects what data can be represented by the property.

The 'Property variable' gives us a reference to the property value for use in our program.

The 'Visible' check box decides if the property is displayed and available for the user to see and the 'Writable' check box decides if the property can be changed or configured by the user. Note that a property cannot be moved or edited if either of these check boxes are ticked.








Property Type

Gen Panel Property Type 01.jpg

Here is a list of different property types that can be added and the data that they represent:

  • Panel Object - Create a list of all the current items on the panel, allowing you to select one.
  • Color Picker - Creates a color wheel allowing you to select a specific color.
  • Color Picker With Transparency - Creates a color wheel with transparency allowing you to select a specific color.
  • Font Picker - Creates a list of installed Fonts.
  • Entire Digital Port - Creates a list of full ports for the current target device.
  • Digital Port Byte - Creates a list of port bytes for the current target device.
  • Single Digital Pin - Allows a single pin to be selected from the chip diagram.
  • Single Analogue Pin - Allows a single analogue capable pin to be selected from the chip diagram.
  • True or False - Creates a check box.
  • Signed Integer - Creates a text field allowing positive and negative integer numbers.
  • Unsigned Integer - Creates a text field allowing only positive integer numbers.
  • Bit Mask - Creates a bit mask with check boxes to set or clear the bits in the mask.
  • Fixed List of Ints - Creates a user selectable list of values each with a unique three digit integer number.
  • Floating Point - Creates a text field allowing positive and negative real numbers.
  • Range From 0 to 1 - Creates a text field allowing a real number to be entered between 0 and 1.
  • Line of Text - Creates a text field allowing a single line of text to be entered.
  • Multiple Lines Of Text - Creates a text field allowing multiple lines of text to be entered.
  • Fixed List of Text - Creates a user selectable list of values each with a unique three character reference.
  • Filename - Creates a text field with a browse button to allow you to select a file.
  • Directory - Creates a text field with a browse button to allow you to select a directory.
  • General Expression - Creates a text field allowing an sum or expression to be entered.
  • Fixed List of Expressions - Creates a user selectable list of expressions each with a unique three digit integer number.


Property Tooltips

Tooltips can be added to properties to provide the user an explanation of what the property will be used for.

The tooltip text can be accessed by clicking the drop down arrow to the right of the Cosmetic Name in the Edit Properties window.


Managing Properties

Error creating thumbnail: sh: /usr/bin/convert: No such file or directory Error code: 127

The property can be edited by right clicking on the property and selecting 'Edit' from the context / drop down menu.

The 'New category' option allows a property folder to be created to house a set of related properties and provide a bit more structure.


The layout of any properties and categories you have added can be altered by simply left clicking and dragging the specific item up and down on the Properties Panel window.








Video instructions

View the Component Properties video for information on how to create and use custom panel properties effectively as well as the differences between the different type of properties available.

{{#ev:youtube|k-J6pCYkEk0|640}}

{{#ev:youtube|xhvrwILJA38|640}}

{{#ev:youtube|RWZcctFtMyU|640}}