Page 1 of 1
Addcombobox()
![Post Post](./styles/prosilver/imageset/icon_post_target.gif)
Posted:
Thu Oct 20, 2016 2:58 pm
by Robertspark
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,
Re: Addcombobox()
![Post Post](./styles/prosilver/imageset/icon_post_target.gif)
Posted:
Thu Oct 20, 2016 4:03 pm
by ger21
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?
Re: Addcombobox()
![Post Post](./styles/prosilver/imageset/icon_post_target.gif)
Posted:
Thu Oct 20, 2016 4:20 pm
by cncdrive
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.
Re: Addcombobox()
![Post Post](./styles/prosilver/imageset/icon_post_target.gif)
Posted:
Thu Oct 20, 2016 4:27 pm
by Robertspark
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?
Re: Addcombobox()
![Post Post](./styles/prosilver/imageset/icon_post_target.gif)
Posted:
Thu Oct 20, 2016 4:33 pm
by cncdrive
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.
Re: Addcombobox()
![Post Post](./styles/prosilver/imageset/icon_post_target.gif)
Posted:
Thu Oct 20, 2016 4:40 pm
by Robertspark
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);
Re: Addcombobox()
![Post Post](./styles/prosilver/imageset/icon_post_target.gif)
Posted:
Thu Oct 20, 2016 4:44 pm
by ger21
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.
Re: Addcombobox()
![Post Post](./styles/prosilver/imageset/icon_post_target.gif)
Posted:
Thu Oct 20, 2016 4:47 pm
by ger21
Robertspark wrote:• The comboboxnumber is the unique identifier of the combobox object.
The screen Editor refers to it as the Label Number.
Re: Addcombobox()
![Post Post](./styles/prosilver/imageset/icon_post_target.gif)
Posted:
Thu Oct 20, 2016 4:50 pm
by Robertspark
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
Re: Addcombobox()
![Post Post](./styles/prosilver/imageset/icon_post_target.gif)
Posted:
Thu Oct 20, 2016 4:59 pm
by Robertspark
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"?