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

ID: Q129740


The information in this article applies to:
  • Microsoft Visual Basic Standard, Professional, and Enterprise Editions, 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 query words: 4.00 buglist4.00 vb4win vb4all

Keywords : PrgCtrlsStd
Version : WINDOWS:4.0
Platform : WINDOWS
Issue type :


Last Reviewed: January 20, 2000
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.