Adding a background color to dialog. Show Labels above it?

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
User avatar
aboredprogrammer
Junior Coder
Posts: 40
Joined: Wed Jan 27, 2010 6:31 am

Adding a background color to dialog. Show Labels above it?

Post by aboredprogrammer » Wed Feb 17, 2010 7:20 am

Hello,

In paint, I made a one color background, it's an off blue color. I have have it the way I want it, but the labels wont show over it. When the program runs, the background color takes over the labels.

I have used the "Send to back" for the background color, and "Send to front" for all the labels. I have even used the "Lock" to see if that makes any difference. No matter what, this background keeps becoming dominant every time the program runs.

Also, I have checked the label colors. They are black, therefore should be clearly visible over the off blue background.

Thank you for any replies.
aboredprogrammer

User avatar
jpuziano
Automation Wizard
Posts: 1085
Joined: Sat Oct 30, 2004 12:00 am

Post by jpuziano » Wed Feb 17, 2010 8:07 am

Hi aboredprogrammer,

Please post your code...
jpuziano

Note: If anyone else on the planet would find the following useful...
[Open] PlayWav command that plays from embedded script data
...then please add your thoughts/support at the above post - :-)

User avatar
JRL
Automation Wizard
Posts: 3529
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Wed Feb 17, 2010 2:23 pm

Make sure the label objects are after the image object in the dialog block.

The following is incorrect, the text will not display
Dialog>Dialog1
Caption=Dialog1
Width=500
Height=350
Top=CENTER
Left=CENTER
Label=Text,48,256,True
Image=C:\imagefile.bmp,0,0,500,350
EndDialog>Dialog1
Move the label to the end of the Block and it will display
Dialog>Dialog1
Caption=Dialog1
Width=500
Height=350
Top=CENTER
Left=CENTER
Image=C:\imagefile.bmp,0,0,500,350
Label=Text,48,256,True
EndDialog>Dialog1

If you are setting the entire dialog to a single color it might be easier to use the SetDialogObjectColor> function

Code: Select all

Dialog>Dialog1
   Caption=Dialog1
   Width=500
   Height=350
   Top=CENTER
   Left=CENTER
   Label=Text,48,256,True
EndDialog>Dialog1

SetDialogObjectColor>dialog1,,15714725

Show>dialog1,res1

And as Jpuziano says: "Post your code"

User avatar
aboredprogrammer
Junior Coder
Posts: 40
Joined: Wed Jan 27, 2010 6:31 am

Post by aboredprogrammer » Wed Feb 17, 2010 5:22 pm

Thank you so much for the replies. Sorry I didn't post the code in the first message.

JRL:The code you provided with putting the labels UNDER the image file works perfect. Thank you very much! :D
aboredprogrammer

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Wed Feb 17, 2010 7:18 pm

Make sure the label objects are after the image object in the dialog block.
This sounds like it should be included in the Help section for Dialog.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

User avatar
jpuziano
Automation Wizard
Posts: 1085
Joined: Sat Oct 30, 2004 12:00 am

Post by jpuziano » Wed Feb 17, 2010 7:30 pm

Bob Hansen wrote:
Make sure the label objects are after the image object in the dialog block.
This sounds like it should be included in the Help section for Dialog.
I second this.

Or, if the dependancy could be removed... if that's possible, then that might be even better... makes it more flexible and no need to document the dependancy... but I do agree that if certain bits must occur before other bits in the dialog definition, it should say that in the Help File under dialog... where else would we look?

Thanks for making this point Bob... good stuff.
jpuziano

Note: If anyone else on the planet would find the following useful...
[Open] PlayWav command that plays from embedded script data
...then please add your thoughts/support at the above post - :-)

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts