Changing Checkbox appearance

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

Changing Checkbox appearance

Postby ger21 » Fri Sep 16, 2016 1:52 pm

Is it possible to change the appearance of Checkboxes, and Combo boxes?
Gerry
UCCNC 2022 Screenset - http://www.thecncwoodworker.com/2022.html
ger21
 
Posts: 2663
Joined: Sat Sep 03, 2016 2:17 am

Re: Changing Checkbox appearance

Postby cncdrive » Fri Sep 16, 2016 4:45 pm

Currently those are fixed, those images are compiled into the UCCNC.exe's resources, so no way to change them at the moment.
cncdrive
Site Admin
 
Posts: 4695
Joined: Tue Aug 12, 2014 11:17 pm

Re: Changing Checkbox appearance

Postby ger21 » Sat Oct 08, 2016 6:37 pm

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.
Gerry
UCCNC 2022 Screenset - http://www.thecncwoodworker.com/2022.html
ger21
 
Posts: 2663
Joined: Sat Sep 03, 2016 2:17 am

Re: Changing Checkbox appearance

Postby ger21 » Sun Oct 09, 2016 4:22 am

I want to replace all the default checkboxes, for a different look.
Gerry
UCCNC 2022 Screenset - http://www.thecncwoodworker.com/2022.html
ger21
 
Posts: 2663
Joined: Sat Sep 03, 2016 2:17 am

Re: Changing Checkbox appearance

Postby cncdrive » Mon Oct 10, 2016 9:49 pm

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.
cncdrive
Site Admin
 
Posts: 4695
Joined: Tue Aug 12, 2014 11:17 pm


Return to Custom Screensets

Who is online

Users browsing this forum: No registered users and 0 guests