BUG: Class Based on Grid Does Not Maintain FontBold Property (163411)
The information in this article applies to:
- Microsoft Visual FoxPro for Windows 5.0
- Microsoft Visual FoxPro for Windows 6.0
This article was previously published under Q163411 SYMPTOMS
If a grid class has the FontBold property set to True (.T.), changing the
ColumnCount of a grid class on a form causes the grid's columns, headers,
and textboxes to lose their FontBold property settings. The grid object
itself maintains its proper FontBold property value; however, the objects
contained in the grid do not inherit this property value. These objects
revert to the default value (False) for the FontBold property.
In Visual FoxPro 3.0b, changing the ColumnCount property does not affect
the FontBold property of the grid's columns, headers, and text boxes.
Therefore, you may notice this behavior on forms that are created in Visual
FoxPro 3.0b and then executed in Visual FoxPro 5.0 for Windows.
RESOLUTION
In the Init of the grid class, add the following code:
FOR i=1 TO This.ColumnCount
This.Columns(i).FontBold=This.FontBold
This.Columns(i).Header1.FontBold=This.FontBold
ENDFOR
This code resets the FontBold property of the columns and column headers
after instantiation of the class. The ColumnCount property determines the
number of columns the grid contains.
STATUS
Microsoft is researching this behavior and will post new information here
in the Microsoft Knowledge Base as it becomes available.
Modification Type: | Major | Last Reviewed: | 10/15/2003 |
---|
Keywords: | kbBug KB163411 |
---|
|