Hi,
I am looking for some help on how to get a consistant dialog presentation across different platforms. I designed a dialog on Vista using Arial 8pt font but when I run it on my XP, the lettering runs off the buttons.
Any suggestions on how I can resolve this?
Font Question
Moderators: JRL, Dorian (MJT support)
Use SetDialogObjectFont
Code Example: SetDialogObjectFont>Dialog1,msButton1,Ariel,8,1,0
Dialog Example:
From the help file
Code Example: SetDialogObjectFont>Dialog1,msButton1,Ariel,8,1,0
Dialog Example:
Code: Select all
Dialog>Dialog1
Caption=Dialog1
Width=190
Height=94
Top=162
Left=503
Button=msButton1,8,16,75,25,0
Button=msButton2,96,16,75,25,0
EndDialog>Dialog1
SetDialogObjectFont>Dialog1,msButton1,Ariel,8,1,0
SetDialogObjectFont>Dialog1,msButton2,Ariel,8,1,0
Show>Dialog1,r
I hope this helpsSetDialogObjectFont>Dialog_Name,Object_Name,Font_Name,Font_Size,Font_Style,Font_Color
Sets the font characteristics of the specified dialog object.
If you are unsure of the name of the object edit the dialog in the Dialog Designer and double click on the object to see it's name.
Font_Style can be one of:
0: Normal
1: Bold
2: Italic
3: Underline
4: Strikeout
Use the RGB function to create a color code. 0 is black.
Abbreviation: SDF
Example:
SetDialogObjectFont>Dialog1,msMemo2,Arial,8,1,0
Thank you for the reply. I am actually using...
SetDialogObjectFont>MainDialog,,Arial,8,1,0
(Sets all objects if Object_Name left blank)
However, the problem is that the font size doesn't appear correctly on my laptop. I am setting this up for more than just myself to use so was hoping there was a generic solution. Thx again.
SetDialogObjectFont>MainDialog,,Arial,8,1,0
(Sets all objects if Object_Name left blank)
However, the problem is that the font size doesn't appear correctly on my laptop. I am setting this up for more than just myself to use so was hoping there was a generic solution. Thx again.
- Phil Pendlebury
- Automation Wizard
- Posts: 543
- Joined: Tue Jan 16, 2007 9:00 am
- Contact:
I use an .ini file with the font and font size settable by the user to get around the various different system defaults.Krysle wrote:Thank you for the reply. I am actually using...
SetDialogObjectFont>MainDialog,,Arial,8,1,0
(Sets all objects if Object_Name left blank)
However, the problem is that the font size doesn't appear correctly on my laptop. I am setting this up for more than just myself to use so was hoping there was a generic solution. Thx again.
An excerpt below:
FROM THE .INI FILE
Code: Select all
[other_options]
def_font=Arial
def_font_size=8
Code: Select all
// READ THE DEFS
ReadIniFile>%SCRIPT_DIR%\ini\defs.ini,other_options,def_font,deffont
ReadIniFile>%SCRIPT_DIR%\ini\defs.ini,other_options,def_font_size,deffontsize
// SET THE FONT STUFF
SetDialogObjectFont>MainDialog,,%deffont%,%deffontsize%,0,0
The user is then directed to edit the values in the INI file to suit his display.
Phil Pendlebury - Linktree