Addcombobox()

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

Addcombobox()

Postby Robertspark » Thu Oct 20, 2016 2:58 pm

void Addcombobox(bool isAS3, int posX, int posY, int Width, int fontsize, int fontcolor, int Numberofaxis, int labelnumber, int layernumber)

could someone kindly explain what the Numberofaxis parameter is with regards to the Addcombobox function?

Thanks,
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.2105, Neuron Lite
UCCNC v1.2105 Macro Manual
Robertspark
 
Posts: 775
Joined: Sat Sep 03, 2016 4:27 pm
Location: Nr Liverpool, England

Re: Addcombobox()

Postby ger21 » Thu Oct 20, 2016 4:03 pm

It looks like they are only used for selecting the axis for homing sequence and slave axis.
So it's the number of axis that are displayed?
Gerry
UCCNC 2017 Screenset - http://www.thecncwoodworker.com/2017.html
ger21
 
Posts: 995
Joined: Sat Sep 03, 2016 2:17 am

Re: Addcombobox()

Postby cncdrive » Thu Oct 20, 2016 4:20 pm

Rob, Gerry,

Yes, earlier the combobox was used only to set the slave and homing axes, at that time we did not know that the software will further develop this much and that everything will become generic as much as possible.
Later when the screensets could be edited and stored in the screenset files then we did not remove this parameter for backwards compatibility and kept it as it was originally.
cncdrive
Site Admin
 
Posts: 2003
Joined: Tue Aug 12, 2014 11:17 pm

Re: Addcombobox()

Postby Robertspark » Thu Oct 20, 2016 4:27 pm

Thanks for that, is there a default setting that is preferred if using the combobox as a generic combobox

The example I have pulled from the screenset is as follows, and "3" can be seen as the number of axis, presume that is X,Y,Z
Example: AS3.Addcombobox(532, 126, 130, 16, -16777216, 3, 11, 45);

"4" would be X,Y,Z,A
"6" would be X,Y,Z,A,B,C

If using this as a generic combobox object should the Numberofaxis parameter be ignored (void), or set to zero?
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.2105, Neuron Lite
UCCNC v1.2105 Macro Manual
Robertspark
 
Posts: 775
Joined: Sat Sep 03, 2016 4:27 pm
Location: Nr Liverpool, England

Re: Addcombobox()

Postby cncdrive » Thu Oct 20, 2016 4:33 pm

Good question, I will have to look that up first, but I think the value probably does not matter then, but will check it to make sure.
cncdrive
Site Admin
 
Posts: 2003
Joined: Tue Aug 12, 2014 11:17 pm

Re: Addcombobox()

Postby Robertspark » Thu Oct 20, 2016 4:40 pm

List of function descriptions not in the manual...... (these are my interpretations )

Addcombobox()
Function: void Addcombobox( int posX, int posY, int width, int fontsize, int fontcolor, int Numberofaxis, int comboboxnumber , int layernumber )
Description: This function adds a combo box object.
Parameters:
• The posX and posY define the top-left corner position of the combobox object, and are in pixels.
• The width defines the dimensions of the combobox object, and is in pixels.
• The fontcolor is the color of the font in integer format of the RGB color code.
• The fontsize defines the size of the font used to render the field text.
• The Numberofaxis defines
• The comboboxnumber is the unique identifier of the combobox object.
• The layernumber is the number of the tab layer the combobox object will appear on.
Example: AS3.Addcombobox(532, 126, 130, 16, -16777216, 3, 11, 45);

Addcomboboxitem()
Function: void Addcomboboxitem(string value, int comboboxnumber )
Description: This function adds a value to a combo box.
Parameters:
• The value defines the string to be added to the combobox.
• The comboboxnumber is the unique identifier of the object.
Example: AS3.Addcomboboxitem("Spiral drill", 11);

Validatenewcomboboxitems()
Function: void Validatenewcomboboxitems( int comboboxnumber )
Description: This function validates the items added to a combo box, it is called after all Addcomboboxitem functions have been called to add items to the combobox with the same unique comboboxnumber.
Parameter:
• The comboboxnumber is the unique identifier of the combobox object.
Example: AS3.Validatenewcomboboxitems(11);

Getcomboboxselection()
Function: string Getcomboboxselection( int comboboxnumber )
Description: This function returns the value selected within a combobox.
Parameter:
• The comboboxnumber is the unique identifier of the object.
Example: AS3. Getcomboboxselection (11);

Clearcomboboxitems()
Function: void Clearcomboboxitems( int comboboxnumber )
Description: This function clears all items from a combo box.
Parameter:
• The comboboxnumber is the unique identifier of the object.
Example: AS3.Clearcomboboxitems(11);

Updatecomboboxselection()
Function: void Updatecomboboxselection( int index, int comboboxnumber )
Description: This function updates the combo box and sets focus on the index item (starting at index zero (0) ).
Parameter:
• The index is the item number in the list to be selected at screen load.
• The comboboxnumber is the unique identifier of the object.
Example: AS3.Updatecomboboxselection(0,11);
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.2105, Neuron Lite
UCCNC v1.2105 Macro Manual
Robertspark
 
Posts: 775
Joined: Sat Sep 03, 2016 4:27 pm
Location: Nr Liverpool, England

Re: Addcombobox()

Postby ger21 » Thu Oct 20, 2016 4:44 pm

Robertspark wrote:"4" would be X,Y,Z,A


Well, "3" gives you None, A, B, C in the slave axis combo boxes.
So I guess there are default values, which can then be cleared, and custom items added, which is done on the CAM page.
Gerry
UCCNC 2017 Screenset - http://www.thecncwoodworker.com/2017.html
ger21
 
Posts: 995
Joined: Sat Sep 03, 2016 2:17 am

Re: Addcombobox()

Postby ger21 » Thu Oct 20, 2016 4:47 pm

Robertspark wrote:• The comboboxnumber is the unique identifier of the combobox object.


The screen Editor refers to it as the Label Number.
Gerry
UCCNC 2017 Screenset - http://www.thecncwoodworker.com/2017.html
ger21
 
Posts: 995
Joined: Sat Sep 03, 2016 2:17 am

Re: Addcombobox()

Postby Robertspark » Thu Oct 20, 2016 4:50 pm

ger21 wrote:
Robertspark wrote:• The comboboxnumber is the unique identifier of the combobox object.


The screen Editor refers to it as the Label Number.


yeah, I know it does the problem is labelnumber gets used for quite a few objects..... the thing is "it is the unique object identifier" if the object is a combobox.... then its the combobox number ..... if its a list box then its a list box number
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.2105, Neuron Lite
UCCNC v1.2105 Macro Manual
Robertspark
 
Posts: 775
Joined: Sat Sep 03, 2016 4:27 pm
Location: Nr Liverpool, England

Re: Addcombobox()

Postby Robertspark » Thu Oct 20, 2016 4:59 pm

as extracted from the plugin functions:

Addcombobox(bool isAS3, int posX, int posY, int Width, int fontsize, int fontcolor, int Numberofaxis, int labelnumber, int layernumber)
Addlist(bool isAS3, string labelfont, string textalign, int fontsize, int fontcolor, int posX, int posY, int Width, int Height, int labelnumber, int layernumber)
AddUCCAM(bool isAS3, int fillcolor, int posX, int posY, int sizeX, int sizeY, int labelnumber, int layernumber)

I believe all can have the same labelnumber but are unique objects.... hence I tried to demonstrate they were unique objects....

maybe it should be "objectnumber"?
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.2105, Neuron Lite
UCCNC v1.2105 Macro Manual
Robertspark
 
Posts: 775
Joined: Sat Sep 03, 2016 4:27 pm
Location: Nr Liverpool, England


Return to Custom Screensets

Who is online

Users browsing this forum: shad and 1 guest