BUG: Grid: No Error Changing FixedAlignment on Non-Fixed Col (81998)



The information in this article applies to:

  • Microsoft Visual Basic Professional Edition for Windows 2.0
  • Microsoft Visual Basic Professional Edition for Windows 3.0
  • Microsoft Professional Toolkit for Microsoft Visual Basic programming system for Windows

This article was previously published under Q81998

SYMPTOMS

Using the Grid custom control, setting the text alignment of a non-fixed column with the FixedAlignment property will not generate an error. Though this value is saved, it does not affect the text alignment of the specified non-fixed column.

STATUS

Microsoft has confirmed this to be a bug 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 Behavior

  1. Start Visual Basic or from the File menu, choose New Project (ALT, F, N) if Visual Basic is already running. Form1 is created by default.
  2. From the File menu, choose Add File (CTRL+F12), and select GRID.VBX to add the Grid control to the Toolbox. The Grid tool appears in the Toolbox.
  3. Add a Grid control to Form1.
  4. Add the following code to the Grid_Click event procedure:
       Sub Grid_Click ()
          Grid1.ColWidth(1)=2000
          Grid1.Col=1
          Grid1.Row=1
          Grid1.Text="Hello"
          Grid1.FixedAlignment(1)=1  'Right Justify
       End Sub
    						
  5. From the Run menu, choose Start (ALT, R, S) to run the program.
Notice that when you click the grid, the FixedAlignment property accepts the new value, but the alignment of the text does not change.

Note that if you try to do the opposite (that is, attempt to set the text alignment of a fixed-column with the ColAlignment property), an "Invalid Column" error message will be displayed.

Modification Type:MinorLast Reviewed:8/16/2005
Keywords:kbbug KB81998