Page 1 of 1

Allow user images for checkboxes.

PostPosted: Tue Jan 16, 2018 12:58 am
by ger21
Can we get the ability to use our own images for checkboxes? And add the ability to resize them.
Would this be difficult to implement?

It would save me from using 200+ macros in my screen.

Re: Allow user images for checkboxes.

PostPosted: Tue Jan 16, 2018 4:48 am
by Sword
I was wondering the same thing when trying to add a checkbox to your screenset and saw how you were going about it. That would be extremely helpful for you!

Re: Allow user images for checkboxes.

PostPosted: Tue Jan 16, 2018 12:45 pm
by dezsoe
Hi Gerry,

On the weekend I helped a man to fine tune his UCCNC with 2017 screenset and HYPlugin. There I saw how 2017 works with checkboxes. Why don't you write a plugin to handle all the checkboxes? If the buttonnumber of those switchbuttons would be in the 10xxx range instead of the 20xxx, then you could gather all those macros into one plugin. The 10xxx range will not search for the macros, so you could manage them in the Buttonpress_event of the plugin. One more vote on this method is that the plugin can work in reset state too. In the constructor macro you can also check if the plugin is running and show warning (and/or turn it on).

Re: Allow user images for checkboxes.

PostPosted: Tue Jan 16, 2018 1:28 pm
by ger21
Because I don't know how to write plugins. :oops:

Re: Allow user images for checkboxes.

PostPosted: Tue Jan 16, 2018 1:53 pm
by cncdrive
Hi Gerry,

I will need some time to check how hard it is to applicate what you asking about.
It requires several things from me to check through before I can give an answer, because I have to keep in mind the backwards compatibility to previous software versions and screensets etc.

Writting plugins is simpler than you probably think. In my opinion to write a plugin is even simpler than to write a macro, especially because Visual Studio has intellisense which helps you to write the code while your writting it and you also get detailed warnings and errors desriptions when you compiling the code.

Check the example C# example plugin in the Plugins/Example folder of the UCCNC.
Just look through the code and I'm sure you will see how it works.
The only thing you need is Visual Studio 2010 or newer or C# express 2010 or newer. They all are free to use or have a free version.

Re: Allow user images for checkboxes.

PostPosted: Tue Jan 16, 2018 2:06 pm
by ger21
Can I write in in VB.net? I have VB 2010 Express installed.

Re: Allow user images for checkboxes.

PostPosted: Tue Jan 16, 2018 2:16 pm
by dezsoe
Yes, of course. There is a VB sample with some words about how to use in the examples folder. Feel free to ask about it, as I made the VB sample.