TabControl

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

TabControl

Postby shad » Sun Jan 29, 2017 6:52 am

Hello!
Is it possible to add TabControl future for the screen?
Thank you!
-- Andrew
UC400ETH
UC300ETH-5LPT
NEURON Lite THC
http://neuroncnc.com/
shad
 
Posts: 331
Joined: Thu Sep 15, 2016 5:23 pm

Re: TabControl

Postby shad » Sun Jan 29, 2017 5:03 pm

OK, I am find solution.
-- Andrew
UC400ETH
UC300ETH-5LPT
NEURON Lite THC
http://neuroncnc.com/
shad
 
Posts: 331
Joined: Thu Sep 15, 2016 5:23 pm

Re: TabControl

Postby shad » Tue Jan 31, 2017 1:27 pm

Hello Terry!
Just my professional controller must have additional control panel for oxyfuel cutting. To save space on the screen, it would be best to have the control panel in the "Windows TabControl" style. But UCCNC allows to make it easy too.
To switch between the two panels (plasma/oxyfuel) I added two tab layers on the screen (this two layers has 2 (RUN) layer as parent). For each layer I am assign it's own background image, set "hasbackground"= true, set size and position. On the first layer I am place all controls for plasma and commons controls. On the second layer all controls for oxyfuel cutting.
Now I have plasma/oxyfuel panel embedded in to the main RUN screen.
I can select layer from plugin by UC.selectlayer() function. Or switch between panels like we switch between Run-ToolPath-Offsets..... layers.
But it's will be great to have ability to find out which layer is currently selected, for example UC.Getselectedlayer().
-- Andrew
UC400ETH
UC300ETH-5LPT
NEURON Lite THC
http://neuroncnc.com/
shad
 
Posts: 331
Joined: Thu Sep 15, 2016 5:23 pm

Re: TabControl

Postby shad » Tue Jan 31, 2017 1:48 pm

Hello Balazs!
Is it possible to have ability to find out which layer is currently selected from plugin?
For example, I have two child layers on the layer #2. I need to know when operator switch between this two layers and which child layer selected.
And it's will be great if we have event when layers selection was changed.
Thank you!
-- Andrew
UC400ETH
UC300ETH-5LPT
NEURON Lite THC
http://neuroncnc.com/
shad
 
Posts: 331
Joined: Thu Sep 15, 2016 5:23 pm

Re: TabControl

Postby cncdrive » Tue Jan 31, 2017 10:26 pm

Hi Andrew,

The first 50 tab layers have LED codes, when the tab layer is selected then the LED is active.
Please check the LEDs by number html document, the 161-211. LEDs are those.
cncdrive
Site Admin
 
Posts: 4695
Joined: Tue Aug 12, 2014 11:17 pm

Re: TabControl

Postby cncdrive » Tue Jan 31, 2017 10:30 pm

But it's will be great to have ability to find out which layer is currently selected, for example UC.Getselectedlayer().


The issue with this is that what should then return is not a single number, because many layers can be selected the same time,
so this could be implemented with returning a List of numbers or an integer array with all the layer IDs which are selected.
Or I could implement a function which could get a layer number as parameter and could return with a boolean value if that tab layer is selected or not.
cncdrive
Site Admin
 
Posts: 4695
Joined: Tue Aug 12, 2014 11:17 pm

Re: TabControl

Postby shad » Wed Feb 01, 2017 8:37 pm

Thank you Balazs!
I think this is not easy way.
My layers has #55 and #56. This two layers are arranged one behind the other and has same size and position. It's looks like Windows TabControl. I hope you understand me.
Easy for me is to add button for switch between this two layers from plugin and control which layer is currently active using the internal bool value.
-- Andrew
UC400ETH
UC300ETH-5LPT
NEURON Lite THC
http://neuroncnc.com/
shad
 
Posts: 331
Joined: Thu Sep 15, 2016 5:23 pm


Return to Custom Screensets

Who is online

Users browsing this forum: No registered users and 2 guests