Page 1 of 1

Changing Checkbox appearance

PostPosted: Fri Sep 16, 2016 1:52 pm
by ger21
Is it possible to change the appearance of Checkboxes, and Combo boxes?

Re: Changing Checkbox appearance

PostPosted: Fri Sep 16, 2016 4:45 pm
by cncdrive
Currently those are fixed, those images are compiled into the UCCNC.exe's resources, so no way to change them at the moment.

Re: Changing Checkbox appearance

PostPosted: Sat Oct 08, 2016 6:37 pm
by ger21
I have a workaround for creating custom checkboxes.
Just use a toggle button with code like thhis:

Code: Select all
if (AS3.Getcheckboxstate(75))
   
{
   AS3.Setcheckboxstate(false, 75);
   AS3.Switchbutton(false, 20001);
}
else
{
   AS3.Setcheckboxstate(true, 75);
   AS3.Switchbutton(true, 20001);
}


Question?
Do the actual checkboxes need to be on the screen when I do this?
If so, my plan was to put them on a hidden tab .
If I don't need to add them, that makes things a little easier.

Re: Changing Checkbox appearance

PostPosted: Sun Oct 09, 2016 4:22 am
by ger21
I want to replace all the default checkboxes, for a different look.

Re: Changing Checkbox appearance

PostPosted: Mon Oct 10, 2016 9:49 pm
by cncdrive
ger21 wrote:Question?
Do the actual checkboxes need to be on the screen when I do this?
If so, my plan was to put them on a hidden tab .
If I don't need to add them, that makes things a little easier.


Yes, unfortunately the checkboxes must be on the screenset, because when they are added in the screenset then the Checkbox objects are created in the UCCNC
and when you set or read the checkbox value then the UCCNC looks for the checkbox with the ID in the query and gets or sets the value on that checkbox object.
If there is no such checkbox on the screen then the value returned is always false and you can't set the value of the checkbox with function calls from code.

The only solution is what you mentioned is to place the checkboxes on an invisible tab page or place them offscreen with for example using negative X or Y coordinates.