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

Last reviewed: September 17, 1996
Article ID: Q129740
The information in this article applies to:
  • Standard, Professional, and Enterprise Editions of Microsoft Visual Basic, 16-bit and 32-bit, for Windows, version 4.0

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.

MORE INFORMATION

Steps to Reproduce Problem

  1. Start a new project in Visual Basic. Form1 is created by default.

  2. 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.

  3. Add a grid control (Grid1) to Form1.

  4. 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

  5. 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 reference words: 4.00 buglist4.00 vb4win vb4all
KBCategory: kbprg kbbuglist
KBSubcategory: PrgCtrlsStd


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: September 17, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.