Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


There are two differences in the way OLE controls process the font structure. First, blank sub-values are interpreted as "leave alone," i.e., you can pass data to only those elements you wish to change. For example, the following code only changes the font's weight to bold (700).

Code Block
 // Set the current font to bold 
Set_Property(@Window:".OLE_CTRL", "OLE.Font", @SVM:@SVM:700)

The second difference has to do with setting the font's height. Normally, the font's height is set in "logical units," a Microsoft convention. A positive value in this field says you want some space between lines of text while a negative value means you want to use a specific "logical" height. However, OI developers usually only care about point size. We like to say, "Arial, 8 pt." -- not, "Arial, -11". Therefore, OLE controls will treat positive values as point sizes. So you can set an OLE control's font size to 8 pt. in two ways:

Code Block
 // Set the current font to 8 pt. 
Set_Property(@Window:".OLE_CTRL", "OLE.Font", @SVM:8) 
Set_Property(@Window:".OLE_CTRL", "OLE.Font", @SVM:-11)