Using the Text Property

When using the VSFlexGrid control in VJ++, you should not access the Text property using the wrapper-generated setText() and getText() methods. Use setCtlText() and getCtlText() instead.

This is because when VJ++ generates the wrapper class for the control, it includes getText() and setText() methods that access the control's window text, which is not related to any properties. If the control happens to have a Text property (which the VSFlexGrid control does), it gets mapped into getCtlText() and setCtlText() instead. Note that this happens for all ActiveX controls, not just the VSFlexGrid.

To use the Text property in VJ++ you would write code such as this:

  private void button1_click(Object source, Event e)

  {

    VSFlexGrid1.setCtlText("Hello World");  // this works

    //VSFlexGrid1.setText("Hello World");   // this doesn't work!

  }