Hi,guys
how can I change the color and the size of the words on a dialog?
I just want to prompt the user to pay attention to special choices.
Thanks in advance!
how can I change color and size of the words on a dialog?
Moderators: Dorian (MJT support), JRL
-
- Junior Coder
- Posts: 28
- Joined: Wed Jun 08, 2005 2:48 pm
Something you can do to make dialogs more interesting is to use the image object within the dialog function. First create the dialog normally so that everything is laid out the way you want it. When you're happy that you won't be making any more changes, run the script. When the dialog pops up use Alt + Print Screen to put the dialog into Window's image buffer. Then paste the image into Microsoft Paint. (It's the only image editing software I have) Resize or crop the image so that it is 10 pixels smaller than the dialog box in the X direction and 30 pixels smaller than the dialog box in the Y direction. Make sure you remove the banner. Then change the image to look like what ever you want it to look like. Change colors, add text, etc... Save it to a bmp or jpg file when you're happy with the results.
A simple dialog for this might be:
Dialog>Dialog1
Caption=Notice
Top=100
Width=300
Left=200
Height=200
Button=OK,108,88,75,25,0
//leave the next line off when you run this to collect the dialog box image
Image=c:\path\ImageFile,0,0,290,170
EndDialog>Dialog1
Show>dialog1
I also want to tell you you may have to play around with the size of the image and/or the size of the dialog to make the image fit the dialog perfectly. It appears that the image needs to be 10 pixels smaller than the dialog in the X direction and 30 pixels smaller than the dialog in the Y direction but I can't guarantee that it will be that way in all cases.
Good luck, hope this was helpful,
Dick
A simple dialog for this might be:
Dialog>Dialog1
Caption=Notice
Top=100
Width=300
Left=200
Height=200
Button=OK,108,88,75,25,0
//leave the next line off when you run this to collect the dialog box image
Image=c:\path\ImageFile,0,0,290,170
EndDialog>Dialog1
Show>dialog1
I also want to tell you you may have to play around with the size of the image and/or the size of the dialog to make the image fit the dialog perfectly. It appears that the image needs to be 10 pixels smaller than the dialog in the X direction and 30 pixels smaller than the dialog in the Y direction but I can't guarantee that it will be that way in all cases.
Good luck, hope this was helpful,
Dick
- CyberCitizen
- Automation Wizard
- Posts: 721
- Joined: Sun Jun 20, 2004 7:06 am
- Location: Adelaide, South Australia