有什么办法让mshflexgrid根据显示的数据内容自动调整大小吗?

解决方案 »

  1.   

    设第一列自动调整行高:
    其它的做一个FOR 循环所有行,
    .rowhight(0)=-1
      

  2.   

    http://expert.csdn.net/Expert/topic/2090/2090565.xml?temp=.8900415
      

  3.   

    设一个Label,.AutoSize=True,.WordWrap=True,.Font=MSFlexGrid.Font,.Width=MSFlexGrid所需调整列的.ColWidth,.Visible=False
    令Label.Caption=MSFlexGrid.Text
    则Lable.Height即是你所要的MSFlexGrid.RowHeight