Difference between revisions of "Enumerate windows fonts"

From DataFlex Wiki
Jump to navigationJump to search
m (Added to the How To category)
m (Added to Tutorials category)
 
Line 29: Line 29:
  
 
[[Category:How To]]
 
[[Category:How To]]
 +
[[Category:Tutorials]]

Latest revision as of 10:44, 25 March 2020

How to enumerate windows fonts

The following code will use the enumerate_fonts method to enumerate all available windows fonts in a comboform. This method has been a hidden method in VDF since long and will become public starting from VDF16.1

   Object oComboFormForceFontName is a ComboForm
       Set Size to 13 100
       Set Location to 184 181
     
       Set Label to "Font"
       Set Label_Justification_Mode to JMode_Top
       Set Label_Col_Offset to 0
  
       Function USER_FONTNAME String facename Integer height Returns Integer
           If facename ne "" Begin 
               Send Combo_Add_Item facename
           End
       End_Function  // USER_FONTNAME
     
       Procedure LoadFonts
           Send Enumerate_Fonts ""
       End_Procedure  
       Send LoadFonts
   End_Object

Links

From topic on forum: Enum List of Windows Fonts ?