PRB: Grid Header Alignment Property Accepts Any Value (190863)



The information in this article applies to:

  • Microsoft Visual FoxPro for Windows 3.0
  • Microsoft Visual FoxPro for Windows 3.0b
  • Microsoft Visual FoxPro for Windows 5.0
  • Microsoft Visual FoxPro for Windows 5.0a
  • Microsoft Visual FoxPro for Windows 6.0

This article was previously published under Q190863

SYMPTOMS

The Grid Alignment property programmatically accepts any numeric value without causing a error. According to the Help file, values 0 through 9 are the only valid values.

This behavior also exists in Visual FoxPro versions 3.x and 5.x.

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

According to Visual FoxPro Online help, values 0 through 9 are valid Grid Header Alignment values, but values outside this range do not cause errors. In general, values below 0 align the header to the middle left and values above 9 align the header to the bottom center.

Steps to Reproduce Behavior

  1. Run the following code and change the Grid Header Alignment property by using the Spinner control:
          frmAlignment=CREATEOBJECT('form')
          frmAlignment.ADDOBJECT('grdHeader','grid')
          frmAlignment.ADDOBJECT('spnSpinner','Gridspinner')
          frmAlignment.grdHeader.COLUMNCOUNT = 3
          frmAlignment.grdHeader.VISIBLE = 1
          frmAlignment.grdHeader.column1.header1.CAPTION = "I"
          frmAlignment.grdHeader.column1.header1.ALIGNMENT = 0 &&Aligned Left
          frmAlignment.SHOW(1)
    
          DEFINE CLASS gridspinner AS SPINNER
              TOP = 225
              VISIBLE = .T.
              PROCEDURE INTERACTIVECHANGE
                  frmAlignment.grdHeader.column1.header1.ALIGNMENT=THIS.VALUE
              ENDPROC
          ENDDEFINE
    						

REFERENCES

Visual FoxPro Help; search on: "Header Alignment Property"

Modification Type:MajorLast Reviewed:5/12/2003
Keywords:kbcode kbprb KB190863