Microsoft KB Archive/129740

= BUG: Grid FixedAlignment Prop Accepts Value for Non-Fixed Cell =

Article ID: 129740

Article Last Modified on 12/9/2003

-

APPLIES TO


 * Microsoft Visual Basic 4.0 Standard Edition
 * Microsoft Visual Basic 4.0 Professional Edition
 * Microsoft Visual Basic 4.0 Professional Edition
 * Microsoft Visual Basic 4.0 16-bit Enterprise Edition
 * Microsoft Visual Basic 4.0 32-Bit Enterprise Edition

-



This article was previously published under Q129740



SYMPTOMS
The FixedAlignment property of the Grid Control is used to get or set a value that determines the alignment of data in the fixed cells of a column. However, this property incorrectly accepts a new value when applied to a non-fixed column; no error message is generated, and the alignment of the text does not change.

This behavior is unlike the ColAlignment property that determines the alignment of data in the non-fixed cells of a column. If an attempt is made to set the text alignment of a fixed-column with the ColAlignment property, an "Invalid Column number for Alignment" error message is correctly displayed.



STATUS
Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.



Steps to Reproduce Problem
 Start a new project in Visual Basic. Form1 is created by default. From the Tools menu, choose Custom Controls. Then select the check box for the Microsoft Grid Control from the dialog box, and click OK. The Grid Control appears in the Visual Basic Toolbox. Add a grid control (Grid1) to Form1.  Add the following code to the Grid1_Click event procedure: Grid1.ColWidth(1)=2000 Grid1.Col=1 Grid1.Row=1 Grid1.Text="Hello" Grid1.FixedAlignment(1)=1 ' Right Justify  Press the F5 key to Run the program. Click the Grid Control. The text in Cell(1,1), which is non-fixed, is not right-justified but no error message is generated to indicate that Cell(1,1) is an invalid column for this alignment property.

Additional query words: 4.00 buglist4.00 vb4win vb4all

Keywords: kbbug KB129740

-

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

© Microsoft Corporation. All rights reserved.