How To Change Control Fonts at Runtime
Previous Topic  Next Topic 

Problem:        How To Change Control Fonts at Runtime


Solution:        Starting with Satellite Forms 7.0, a new control property is provided to change control fonts at runtime.  This capability is implemented for the PalmOS and PocketPC platforms.


Font


Controls(ControlName).Font

Returns or sets the current FontID of a control.

Parameter

ControlName

Name of a control.

Return Value

The current FontID of the control, an integer value from 0..7 (PalmOS) or 0..3 (PocketPC) corresponding to this table of FontIDs:

             

FontID

Font Description PalmOS

Font Description PocketPC

0

Normal 9

Tahoma 8

1

Bold 9

Tahoma 8 Bold

2

Normal 12

Tahoma 10

3

Symbol 9

Tahoma 10 Bold

4

Symbol 11

n/a

5

Symbol 7

n/a

6

LED

n/a

7

Bold 12

n/a


Comments

Font is a property of the Control object. You can change a control's font property by setting this property to one of the specified FontID values. In that case, the function does not return a value.

Example

'Example of Font property

'InputA is an edit control.

'change InputA font to Bold

If InputA.Font = 0 Then

    InputA.Font = 1

EndIf

See Also

SetPosition



Keywords:      Font, control, normal, bold, Tahoma, FontID


KB ID: 10041 

Updated: 2006-10-02


Satellite Forms KnowledgeBase Online

Satellite Forms Website Home