Dialog background color
Moderators: JRL, Dorian (MJT support)
Dialog background color
I know I can now change fonts and the color of a font in a dialog. Is there any way the backround color can be set? I saw on another post you can set the default in Windows but that applies to all. Currently I load a white bmp image; however, because the macro has to load a huge image it takes longer to load the entire script.
I use a font color for background color in dialogs. There might be a Windows API function to do this but I haven't looked since this is so easy to use. Be sure to read the remarks.
Code: Select all
Dialog>Dialog1
Caption=Back Ground Color
Width=265
Height=132
Top=286
Left=238
Max=1
Min=1
Close=1
//Need to set resize to Zero to prevent scroll bars
Resize=0
//Need to make the following label the first object in
//the dialog so that all other objects are on top of it.
Label=g,0,0
Button=Ok,88,64,75,25,3
Edit=msEdit1,8,24,241,
//Need to make labels transparent
Label=Enter your info,88,8,True
EndDialog>Dialog1
//Set Text Color (color number 234567 is a shade of green)
//The letter "g" in webdings is a filled box. Nice for doing
//background colors in dialogs. The size can be controlled by
//the font size. 4095 is probably the largest number possible
//when using the standard Windows Webdings font.
SetDialogObjectFont>Dialog1,msLabel1,WebDings,4095,1,234567
show>dialog1,res1
Dialog Background Color
Works like a charm and very easy. Do you have a color reference or where I could get one? I really only want white (I have limited taste)
This post has a color picker program that will put the selected color number to the clipboard. You can then paste it into your script.
Python Color Chooser
Python Color Chooser
Code: Select all
/*
Color:
import tkinter
from tkinter import colorchooser
parent = tkinter.Tk()
parent.withdraw()
color = colorchooser.askcolor(initialcolor=(255, 255, 255), parent=parent)
print(color)
*/
LabelToVar>Color,pCode
PYExec>PCode,vColor
MDL>vColor