怎么样用语句控制每栏的宽度可以自己拉动

解决方案 »

  1.   

    允许拉动
    if not (dgColumnResize in DBGrid1.Options) then
      DBGrid1.Options :=DBGrid1.Options +[dgColumnResize];不允许拉动
    if dgColumnResize in dbGrid1.Options then
      DBGrid1.Options:=DBGrid1.Options -[dgColumnResize];
      

  2.   

    为什么还要用判断语句,那么options里的其他设置都要这样的吗?
      

  3.   

    Options属性是一个集合,如果集合中没有那个值,而你把那个值从集合里去除,你说会怎样
      

  4.   

    设竚
    DBGridOptions dgColumnResize属┦
      

  5.   

    设置 DBGrid的Options 的dgColumnResize属性
      

  6.   

    同意: TOMWLD(笑天)
    的方法。
      

  7.   

    在option里的dgcolumnsize的属性设为true