PRB: Class Based on Grid Does Not Maintain FontBold PropertyLast reviewed: February 12, 1997Article ID: Q163411 |
The information in this article applies to:
SYMPTOMSIf 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.
RESOLUTIONIn 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 ENDFORThis 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.
STATUSMicrosoft is researching this behavior and will post new information here in the Microsoft Knowledge Base as it becomes available.
MORE INFORMATIONThe steps listed below assume a working knowledge of creating classes and forms and setting the properties of objects contained within a form.
Steps to Reproduce Behavior
|
KBCategory: kbgraphic kbprg kbprb
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |