Set Dialog Color background

Ideas for new features & functions

Moderators: Dorian (MJT support), JRL

Post Reply
kpassaur
Automation Wizard
Posts: 696
Joined: Wed Jul 07, 2004 1:55 pm

Set Dialog Color background

Post by kpassaur » Sun Dec 07, 2008 5:06 pm

Does anyone know of a way to set the background color of a Dialog box.

A) Without - using an image file
B) Without - using this method where you have the label the first in line and set the color with the WebDings, (this works fine with XP but not so well in Vista)

Label=g,0,0,true

SetDialogObjectFont>SetupOptions,msLabel1,WebDings,4095,16777215

User avatar
Marcus Tettmar
Site Admin
Posts: 7380
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Sun Dec 07, 2008 5:37 pm

One day, we may add more options to the dialog designer to set more object properties, such as form color. One day. Maybe. No promises.

In the mean time here's an easy way to set the background of the form to white:

Code: Select all

Dialog>Dialog1
   Caption=Dialog1
   Width=445
   Height=250
   Top=218
   Left=151
   TabBook=msTabBook1,0,0,429,214,1
   EndTabBook
   Button=msButton1,79,31,75,25,0
   Button=msButton2,81,68,75,25,0
EndDialog>Dialog1

Show>Dialog1,r
It can probably be done with a few Win32 API calls also. I'll see what I can find.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

kpassaur
Automation Wizard
Posts: 696
Joined: Wed Jul 07, 2004 1:55 pm

Using Tab Function

Post by kpassaur » Sun Dec 07, 2008 6:20 pm

I just tried the example and I can add everything except labels for some reason unknow to me. List boxes, Radio Buttons everything except for a label. When I try it just appears white and goes to the back. Well I thought it was going to the back, but when I seleced the page tab and sent it the back nothing changed.

Could you post an example with text that shows.

User avatar
Marcus Tettmar
Site Admin
Posts: 7380
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Sun Dec 07, 2008 7:14 pm

Ok, that isn't going to work then.

I can see a SetDialogBackColor function being needed.

In the mean time I think the best solution is just a background image, as in my reply to your other thread, which you can of course set to whatever colour or image you like.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

kpassaur
Automation Wizard
Posts: 696
Joined: Wed Jul 07, 2004 1:55 pm

Background Color

Post by kpassaur » Sun Dec 07, 2008 7:34 pm

That would be great. I like some other users (I think); just want something simple that builds corporate identity. I don’t need or want something that has all kinds of bells and whistles. Just select a Font (as it does now) and a background color. Maybe in ver 13, 14 or 15 someway to see and place the font in the designer would be nice. My idea is to make all dialogs similar without much effort. In other words, a simple template with a standard color background, logo and Font for the Title of the Dialog is my goal. So it really comes down to just a header that would expand to meet the Width of the Dialog.

This way I could create a half a dozen different ones (number of Browse Buttons, drop downs etc) and save them as snippets. The advantage being faster to create the macros and I end up with standardization for corporate identity.

For now I am just going to skip the logo and background color and just use the Font options. The other choices don't really work out that well for me and I have tried all of them.

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