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

Re: Changing Checkbox appearance

Postby Vmax549 » Sun Oct 09, 2016 12:46 am

HI Gerri, Could you not just use a toggle button on its own. Teh button image is 2 part so it would look ether checked of unchecked. And if you needed to know teh state just query teh button state. Same as you would teh Checkbox state. That way you are not having to munipulate 2 elements at teh same time

Also do you need the states to be persistant ?

Just a thought(;-) TP
Vmax549
 
Posts: 844
Joined: Sun Nov 22, 2015 3:25 am
Location: USA

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 2017 Screenset - http://www.thecncwoodworker.com/2017.html
ger21
 
Posts: 931
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: 1786
Joined: Tue Aug 12, 2014 11:17 pm


Return to Custom Screensets

Who is online

Users browsing this forum: No registered users and 1 guest