AS3.addfield() >>> updown??

If you created a new screenset and want to share it with others then please post it here. You can talk about screens here.

AS3.addfield() >>> updown??

Postby Robertspark » Mon Dec 24, 2018 11:10 am

screenset_functions.htm extract:

Code: Select all
 Function: void Addfield(string labeltext, string labelfont, string textalign, int fontsize, int fontcolor, double posX, double posY, int fieldwidth, string type, double min, double max, int labelnumber, int layernumber)

Description: This function adds one field object onto the screen. Each field object represents a text label on the UCCNC screen.

The labeltext parameter defines a text string which will be written before the field on the screen. The labelfont parameter defines the font used for both the text string and the field text.

The textalign parameter defines where the text is aligned inside the field, the possible values are "left", "right" and "center".

The fontsize defines the size of the dont used to render the field text and the fontcolor is the color of the font in integer format of the RGB color code.

The posX and posY parameters defines the top-left corner of the field and the fieldwidth defines the length of the field in pixels.

The type is a special parameter, the possible values are the "textfield", "textfieldnb", "showfield", "showfieldnb", "field", "fieldnb".

The "textfield", "textfieldnb", "field", "fieldnb" type fields can be read and written from macro code and are editable by the user on the UCCNC GUI.

The "textfield", "textfieldnb" can contain any kind of text including words. The "field", "fieldnb" can contain numerical values only.

The "showfield", "showfieldnb" type labels can be read and written from macro code and are not editable by the user on the UCCNC GUI.

The "nb" at the end of the parameter means "no border", so these type of fields will have no visual border on the screen.

The min and max parameters defines the minimal and maximal numerical value for the "field", "fieldnb" type fields, the user can't enter numbers out of this range.

The labelnumber is the identifier number of the field, the different label numbers and their meaning are listed in a separated document.

The layernumber is the number of the tab layer the field will appear on.

Example: AS3.Addfield(" ", "Arial", "right", 21, 7961465, 50, 100, 128, "showfieldnb", double.MinValue, double.MaxValue, 866, 2);



Screenshot.
2018-12-24 11_09_35-Window.png


What is type 'updown'??
Rob
Einstein ― “If you can't explain it to a six year old, you don't understand it yourself”
...working my way through the 1000+ ways things don't work to find the one that does
UC400eth, UC300eth, UCCNC v1.2109, Neuron Lite
UCCNC v1.2108 Macro Manual
Robertspark
 
Posts: 1322
Joined: Sat Sep 03, 2016 4:27 pm
Location: Nr Liverpool, England

Re: AS3.addfield() >>> updown??

Postby dezsoe » Mon Dec 24, 2018 1:12 pm

E.g. the port/pin settings where you have arrows to increment/decrement the value.
dezsoe
 
Posts: 726
Joined: Sun Mar 12, 2017 4:41 pm
Location: Csörög, Hungary

Re: AS3.addfield() >>> updown??

Postby Robertspark » Mon Dec 24, 2018 2:01 pm

Thanks Dezsoe
Rob
Einstein ― “If you can't explain it to a six year old, you don't understand it yourself”
...working my way through the 1000+ ways things don't work to find the one that does
UC400eth, UC300eth, UCCNC v1.2109, Neuron Lite
UCCNC v1.2108 Macro Manual
Robertspark
 
Posts: 1322
Joined: Sat Sep 03, 2016 4:27 pm
Location: Nr Liverpool, England


Return to Custom Screensets

Who is online

Users browsing this forum: Google [Bot] and 3 guests