Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
A new global default font.....
Message
From
04/08/2000 17:04:21
 
 
To
04/08/2000 14:01:39
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00401230
Message ID:
00401399
Views:
21
When the first columns are added, you can just double-click the grid.FontName to let it change, the right-click and ResetToDefault. All the contained controls get changed.
If you've resized the columns before setting the font, or are adding new columns or controls, it is trickier.
I wrote this little prg to help me with this, and gave it an ON KEY LABEL call.
** FixGrid()
LOCAL ji, laCols(1,1), laObj(1,1), loGrid
ASELOBJ(laObj)
IF TYPE("laObj")#"O" OR UPPER(laObj[1].BaseClass)#"GRID"
  RETURN
ENDIF
loGrid = laObj[1]
DIMENSION laCols(loGrid.ColumnCount)
FOR ji = 1 TO loGrid.ColumnCount
  laCols[ji] = loGrid.Columns(ji).Width
ENDFOR
loGrid.ResetToDefault("FontName")
loGrid.ResetToDefault("FontSize")
FOR ji = 1 TO loGrid.ColumnCount
  loGrid.Columns(ji).Width = laCols[ji]
ENDFOR
HTH
Insanity: Doing the same thing over and over and expecting different results.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform