没有事件。
用计时控件监视列宽度的改变
sub MS1_gotfocus()
 timer1.enabled=true
 for i=0 to ms1.cols-1
 ms1.coldata(i)=ms1.colwidth(i)
 next i
end subsub ms1_lostfocus()
 timer1.enabled=false
end subsub Timer1_Timer()
 for i=0 to ms1.cols-1
 if ms1.coldata(i)<>ms1.colwidth(i) then
  msgbox "列" & i+1 & "宽度改变"
 end if
 next i
end subfor i=0 to ms1.cols-1
 ms1.colwidth(i)=i*1000
next i

解决方案 »

  1.   

    上面代码有错误。
    sub MS1_gotfocus()
     for i=0 to ms1.cols-1
     ms1.coldata(i)=ms1.colwidth(i)
     next i
     timer1.enabled=true
    end sub
      

  2.   

    不好意思,第二個問題錯了,應該是如何改變某列的位置就像Scroll一樣。
      

  3.   

    有沒有更靈活一些的方法,我的目的是使兩個MSHFlexGrid的列列列完全對齊,其中一個是可以橫向Scroll的
      

  4.   

    你好笨啊,何止是菜!sub form_load()
     ms1.cols=20
     ms2.cols=20
     for i=0 to 19
      ms1.colwidth(i)=1000
      ms2.colwidth(i)=1000
     next i
    end subsub ms1_scroll()
     ms2.leftcol=ms1.leftcol
    end sub