Machsupport Forum

Mach Discussion => VB and the development of wizards => Topic started by: stevehuck on September 11, 2011, 08:32:59 AM

Title: Button Color?
Post by: stevehuck on September 11, 2011, 08:32:59 AM
Is it possible to change button colors in machscreen? I just want to make my cycle start botton green and the stop button red.  I would also like to put frames around groups of controls to make things easier to deal with. Is it possible to draw lines in MS?
Title: Re: Button Color?
Post by: stevehuck on September 11, 2011, 02:07:16 PM
I have tried an image button with a BMP file attached. The button shows up in machscreen but when I load the wizard in mach the button is invisable. Funny thing is, it works. I suspect the image file isn't loading properly.

I'm gaining on it.
Title: Re: Button Color?
Post by: BR549 on September 11, 2011, 02:38:57 PM
Hiya Steve, are you building screens or are you building Wizards(:-).

If you look at where things are stored for a wizzard (addons) you see that the bitmaps are normally stored in the wizards's directory under bitmaps.
C:\Mach3\Addons\Nameof Wizard\Bitmaps for example.

THEN you make sure you assign it from that directory so the screen KNOWS where to find it.

IF you are doings screens then you normall store the bitmaps in the MACH3 directory under bitmaps OR under the profile you are running.

C:\Mach3\Bitmaps   or C:\Mach3\Bitmaps\Profilename.

Same deal move them into their directory THEN assign the path.

OK you KNOW you are going to have to show and tell right????

Hope that helps, (;-) TP


Title: Re: Button Color?
Post by: stevehuck on September 11, 2011, 03:03:55 PM
Hiya Steve, are you building screens or are you building Wizards(:-).

If you look at where things are stored for a wizzard (addons) you see that the bitmaps are normally stored in the wizards's directory under bitmaps.
C:\Mach3\Addons\Nameof Wizard\Bitmaps for example.


It's a wizard for making pens. I'm doing it for a friend that makes custom pens.

I put the bitmap in G:\Mach3\TurnAddons\PenMaker\Images

The bitmap shows up in MachScreen but when the wizard is loaded into mach the button is invisable. Im trying to figure all this out just to have a red stop button.
Title: Re: Button Color?
Post by: BR549 on September 11, 2011, 03:19:15 PM
Are you using an image button in Machscreen?
Title: Re: Button Color?
Post by: stevehuck on September 11, 2011, 03:31:36 PM
Are you using an image button in Machscreen?

Yes I am.

Function             Stop
Code                  3
Image path         G:\Mach3\TurnAddons\PenMaker\Images\PenStopButton.bmp

Title: Re: Button Color?
Post by: BR549 on September 11, 2011, 03:55:57 PM
hUM that is a new one for me. Have you gone to the image and make sure it is not an empty image? Load it in paint??

Did it load UNDER the screen image by chance?

Just a thought, (;-) TP
Title: Re: Button Color?
Post by: stevehuck on September 11, 2011, 03:59:54 PM
Have you gone to the image and make sure it is not an empty image? Load it in paint??

Did it load UNDER the screen image by chance?

Just a thought, (;-) TP

It's a good image that I created in paint. It shows up in machscreen.

I don't know how to check and see if it loaded under the screen image.  How do I check that?
Title: Re: Button Color?
Post by: ger21 on September 11, 2011, 04:01:36 PM
Are you setting the path to the wizard in Machscreen in the Settings window?
Title: Re: Button Color?
Post by: stevehuck on September 11, 2011, 04:05:42 PM
User defined image path is set!
Title: Re: Button Color?
Post by: BR549 on September 11, 2011, 04:18:31 PM
Not certain but I think the wizzards work differrent in they need the bitmaps in a certain place. Looking at ALL the wizards in mach3 the wizard bitmaps are with the wizard DIR

c:\mach3\addons\Wizardname\Bitmaps

Testing here the only way I can get it to act that way is IF the image is NOT where it is suppose to be. In mach the imabe will be missing BUT the function will still work IF you press the spot where the Button Was placed.
(;-) TP
Title: Re: Button Color?
Post by: BR549 on September 11, 2011, 04:22:30 PM
I see that you have mach3 running on G drive is that correct?

Just a thought,(;-) TP
Title: Re: Button Color?
Post by: stevehuck on September 11, 2011, 04:32:10 PM
I see that you have mach3 running on G drive is that correct?

Just a thought,(;-) TP


That is correct. That is my primary drive where windoze is installed. c: is for storage only and backup copies of certian things.

I do have the bitmap in a subfolder of the wizard.

All the other wizards and mach have buttons similar and they show up.
Title: Re: Button Color?
Post by: stevehuck on September 11, 2011, 04:34:46 PM
I tried to change the path to the bitmap and i got this error.

Image path can only be changed, if no setfile data is loaded.

Does that mean anything to you?

Title: Re: Button Color?
Post by: BR549 on September 11, 2011, 06:01:30 PM
Steve the only thing I can suggest is that it MAY be a permissions thing where MACH3 does not have permissions to use that directory where the images are stored???.

THAT IS a big problem in Vista. May want to try running MACH  as ADMIN to see if it makes a difference.

AND double triple check the path in MACHSCREEN for the button. Or try moving it to a different directory and path???

SAY something like
G:\Mach3\TurnAddons\PenMaker\Bitmaps\PenStopButton.bmp


(;-) TP

Title: Re: Button Color?
Post by: stevehuck on September 11, 2011, 06:25:34 PM
Steve the only thing I can suggest is that it MAY be a permissions thing where MACH3 does not have permissions to use that directory where the images are stored???.

THAT IS a big problem in Vista. May want to try running MACH  as ADMIN to see if it makes a difference.

AND double triple check the path in MACHSCREEN for the button. Or try moving it to a different directory and path???

SAY something like
G:\Mach3\TurnAddons\PenMaker\Bitmaps\PenStopButton.bmp


If it helps i'm running XP

the "Image path can only be changed, if no setfile data is loaded." error is a machscreen error.



Title: Re: Button Color?
Post by: stevehuck on September 11, 2011, 06:39:57 PM
SAY something like
G:\Mach3\TurnAddons\PenMaker\Bitmaps\PenStopButton.bmp


Good call!  I changed my sub folder name from "images" to "Bitmaps" and deleted the path in machscreen and I can now see the button when running in mach.

Thanks!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Title: Re: Button Color?
Post by: BR549 on September 11, 2011, 06:55:09 PM
Givin enough time WE can beat the fleas right off the old dawg(;-)

Good Job, (;-) TP
Title: Re: Button Color?
Post by: ger21 on September 11, 2011, 08:30:07 PM
The folder name must always be \Bitmaps\ for all screens and wizards.
Title: Re: Button Color?
Post by: stevehuck on September 11, 2011, 08:59:47 PM
The folder name must always be \Bitmaps\ for all screens and wizards.

Where were you a couple hours ago?

Thanks Ger21!!
Title: Re: Button Color?
Post by: Klaus1311 on September 12, 2011, 02:57:18 AM
Hello,

the message "Image path can only be changed if no setfile is loaded" shows only up when a attempt is made to set or change the "User defined image path" in the "Generic progr settings" dialog.
This field should only be used if multiple bitmap folders for the same set file are used. In that case the bitmaps must be copied by hand to the Mach3\Bitmaps folder.
I don't think many users will need that option.



Klaus