Microsoft KB Archive/155930

= FIX: Grid on Page2 Does Not Refresh After ColumnCount Change =

Article ID: 155930

Article Last Modified on 9/30/2003

-

APPLIES TO


 * Microsoft Visual FoxPro 3.0 Standard Edition
 * Microsoft Visual FoxPro 3.0b Standard Edition

-



This article was previously published under Q155930



SYMPTOMS
When you create a new form as a subclass of a custom Form class, changing the number of columns in a Grid object located on a page other than the first page of a PageFrame object results in refresh inconsistencies.



STATUS
Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. This problem has been corrected in Microsoft Visual FoxPro version 5.0 for Windows.



Steps to Reproduce Behavior
 Create a new project:

 Click New from the File menu. Click Project. Click the New File button. Assign a file name for new project. </li> Create a new class in a new class library:

 Click the Classes tab.</li> Click New.</li> Assign a new class name.</li> Click Form from the "Based On" drop-down list box.</li> Assign a class library name in the "Store In" text box.</li> Click OK.</li></ol> </li> Create a new Form:

 From the Form Controls toolbar, click the PageFrame control and draw a PageFrame object on the Form.</li> From the shortcut menu, click Edit (right-click the PageFrame object).</li> Click the Page2 tab.</li> From Form Controls toolbar, click the Grid control from Form Controls toolbar and place a Grid object on the second page of the PageFrame object.</li> From the File menu, click Save.</li> From the File menu, click Close.</li></ol> </li> <li>Make this new class the default Form class:

<ol style="list-style-type: lower-alpha;"> <li>From the Tools menu, click Option.</li> <li>Click the Forms tab.</li> <li>Under the Template Classes section, select the Form check box. Select or type the path and name of the new class you created in Step 2.</li> <li>Click OK.</li></ol> </li> <li>Create a new Form based on the class you created in Step 2:

<ol style="list-style-type: lower-alpha;"> <li>In the Project Manager, click the Documents tab.</li> <li>Click Forms.</li> <li>Click New.</li> <li>Click the New Form button.</li></ol> </li> <li>Change the Grid object's ColumnCount on Page2:

<ol style="list-style-type: lower-alpha;"> <li>Click the PageFrame object.</li> <li>From the shortcut, menu Click Edit (right-click the PageFrame object).</li> <li>Click the Page2 tab of the PageFrame object.</li> <li>Click the Grid object.</li> <li>From the shortcut menu, click Properties (right-click the Grid object).</li> <li>From the Property window, click the ColumnCount property.</li> <li>Change the ColumnCount property value to 3.</li></ol> </li></ol>

Notice that the Grid object does not refresh immediately. (The Grid does not refresh until the Page1 tab is selected and the Page2 tab is reselected.)

(c) Microsoft Corporation 1997, All Rights Reserved.

Contributions by Perry Newton, Microsoft Corporation

Keywords: kbbug kbfix kbusage KB155930

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.