Machsupport Forum

Mach Discussion => VB and the development of wizards => Topic started by: leversole on January 08, 2017, 06:03:42 PM

Title: Visibility or color property
Post by: leversole on January 08, 2017, 06:03:42 PM
How can I set/change either the visibility or color of a screen object? I am designing some new screens, and just as an example, I would like to have an LED be invisible (or the background color) until I turn it "on"? Or, I would have a small icon (of a "home" for example), and it would not be visible until the axis is homed?

Title: Re: Visibility or color property
Post by: ger21 on January 09, 2017, 06:56:09 AM
You make the LED image with 1/2 of it (the "off" half) transparent.
But you can't put it over or inside of a DRO.
Title: Re: Visibility or color property
Post by: leversole on January 09, 2017, 06:59:00 AM
Thanks Gerry...I often wondered how those half and half buttons work! I guess I will figure it out...it would only appear to be "over" the DRO as the DRO area box background is the same color as the DRO background...

Thanks
Leslie
Title: Re: Visibility or color property
Post by: ger21 on January 09, 2017, 07:28:26 AM
You make an image for the LED. Make sure the width is an even number of pixels, and twice the width that the the actual LED control will be.
The left half is the off state, and the right half is the on state.
Title: Re: Visibility or color property
Post by: leversole on January 09, 2017, 07:49:59 AM
Thanks...will test it out today...
Title: Re: Visibility or color property
Post by: leversole on January 10, 2017, 06:06:16 PM
Struggling with the LED...

I am using MachScreen and testing on the Aqua screen set...

I created a *.png file 100 px wide with half transparent...when I try to create a new LED, when I choose the image path my file does not show up now matter where I put it, in Mach3\Bitmaps, or even Mach3\Bitmaps\Aqua...it's name is HomeIcon.png (I have attached the image)

If I try to change an existing button, to another *.png in teh same (Aqua) directory, I get an erro message that does not make sense (I amd pulling form the proper directory)...I have attached the error msg.

Any thoughts? I thought I read one time a set of instructions on how to use the two state image LED...cant put my hands on it...but I may be having other issues as noted above.

Title: Re: Visibility or color property
Post by: ger21 on January 10, 2017, 06:13:21 PM
That's a Machscreen error, and I dont use Machscreen, so I don't know. But it looks like you maybe need to set the path in Machscreen before you can use images from that path??

There's nothing special to creating these, just create an LED, and assign the image. That's it.
Title: Re: Visibility or color property
Post by: Klaus1311 on January 11, 2017, 06:20:34 AM
Hi Leversole

I don't think thats an error of MachScreen. Please make sure "User defined Image path" in the Settings -> Generic prog Settings dialog is empty. Your Image must be placed in  C:\Mach3\Bitmaps, or in a subfolder under C:\Mach3\Bitmaps (if you are using standard installation path). When you place the LED you can doublle click the "Image path" value. Than you can select your Image.


Klaus
Title: Re: Visibility or color property
Post by: ger21 on January 11, 2017, 06:26:43 AM
It says Machscreen Error in the Message box??
Title: Re: Visibility or color property
Post by: Klaus1311 on January 11, 2017, 07:28:25 AM
ok, the message is perhaps a bit missleading. What I'm trying to say is, Machscreen discovered an error and cannot complete the user request.



Klaus
Title: Re: Visibility or color property
Post by: leversole on January 11, 2017, 06:23:56 PM
May be getting closer!