Description of the Font Property

DIAdem 2018 Help


Edition Date: June 2018
Part Number: 370858P-01
View Product Info

DOWNLOAD (Windows Only)


DIAdem 2012 Help
DIAdem 2014 Help
DIAdem 2015 Help
DIAdem 2017 Help
DIAdem 2018 Help
DIAdem 2019 Help

The Font object specifies the font, the font style, the font size, and the font attributes of controls in a user dialog box. The Font object consists of the following properties, which you enter in a string, separated by commas.

Refer to the Microsoft help file on LogFont structure for more information.

lfHeight LongInteger
Specifies the font size.
lfWidth LongInteger
Reserved (=0).
lfEscapement LongInteger
Reserved (=0)
lfOrientation LongInteger
Reserved (=0).
lfWeight LongInteger
Specifies the width of the font in a value range from 0 to 1000.
400 creates a normal font, and 700 creates a bold font.
0 is the standard width.
lfItalic Byte
Specifies whether the text is displayed in italic font.
lFUnderline Byte
Specifies whether the text is displayed in underline font.
lfStrikeOut Byte
Specifies whether the text is displayed in strikethrough font.
lfCharSet Byte
Specifies the font. (0=ANSI_CHARSET, 1=DEFAULT_CHARSET, 2=SYMBOL_CHARSET)
lfOutPrecision Byte
Reserved
lfClipPrecision Byte
Reserved
lfQuality Byte
Reserved
lfPitchAndFamily Byte
Reserved.
lfFaceName String
Specifies the font.

The following example specifies the font for Text1 as Arial, 10 pt, standard:

Text1.Font = "-13,0,0,0,400,0,0,0,0,3,2,1,34,Arial"

The following example specifies the font for Text2 as Wingdings, 11 pt, bold italics:

Text2.Font = "-15,0,0,0,700,1,0,0,2,3,2,1,2,Wingdings"

The following example shows how you use a script to modify the font for a control and how you set the Font property correctly. This example uses a script to change the Font property for Button1 to Times New Roman, italics, 12 pt.

Define a temporary button called Button2. Click Font on the associated Properties tab and enter the font settings that you want to assign to the Button1 button. Then define the EventClick event for the Button2 button. To do this, click EventClick on the associated Events tab.

Sub Button2_EventClick(ByRef This)
  Call Inputbox("Test", "Font", This.Font)
End Sub

When you click the Button2 button, a dialog box that displays the current font settings appears. Save the user dialog box and click Test in DIAdem. Click the Button2 button. The dialog box with the font settings appears. Copy the font settings, close the dialog box, and end the test.

Assign the copied font setting in the script to the font property of the Button1 button.

Button1.Font = "-16,0,0,0,400,255,0,0,0,3,2,1,18,Times New Roman"

Use

Procedures

Checking a User Dialog Box Entry | Closing a User Dialog Box with a Script | Creating a Dynamic User Dialog Box | Creating a Non-Modal User Dialog Box | Creating a Procedure in the Script of a User Dialog Box | Creating a User Dialog Box without Linking Variables | Creating a User Dialog Box | Creating an Extended Table | Displaying Graphics in Selection Lists | Enabling Controls | Opening the Dialog Editor | Responding to Cancellation of a User Dialog Box | Responding to User Entries in User Dialog Boxes | Saving and Restoring the Last Dialog Box Position | Saving Control Groups for User Dialog Boxes | Specifying the Default Button | Tabulator Order in a User Dialog Box | Transferring a Parameter to a User Dialog Box | Transferring User Dialog Box Entries to DIAdem | Using a Script to Fill a Selection List | Using Channel Selection Lists | Using Hotkeys in a User Dialog Box | Using the Flex Properties

Examples

Analyzing and Displaying Channels Section by Section | Checking Dialog Box Entries | Dynamic User Dialog Box | Translating User Dialog Boxes | User Dialog Box for Entering Text and Numbers | User Dialog Box for Sequence Control | User Dialog Box in DIAdem VIEW | User Dialog Box in VIEW for the Calculation of the FFT and Harmonic Frequencies | User Dialog Box with Changing Background Color | User Dialog Box with Curve Preview | User Dialog Box with Extended Table | User Dialog Box with Internet Explorer | User Dialog Box with Scalable Table | User Dialog Box with Selection Lists | User Dialog Box with Selection Lists | User Dialog Box with Subdialog Boxes | User Dialog Box with Tables | User Dialog Box with Tree | Wizard for Tolerance Evaluation

WAS THIS ARTICLE HELPFUL?

Not Helpful