when ColumnHeader hide, but hidden ColumnHeader width is not zero?

Posted by: lgw6237 on 8 September 2017, 4:35 am EST

  • Posted 8 September 2017, 4:35 am EST

    when ColumnHeader  hide, but hidden ColumnHeader width is not zero?,from my attach file,you can see that "G" ColumnHeader not display,but when caculate cell tatal width,"G" ColumnHeader width is 60 pixel, how to ensure "G" ColumnHeader width is equal zero ,when i darg "g" to not display? thanks.

  • Replied 8 September 2017, 4:35 am EST

    Is this Spread for Windows forms?  If so I am not seeing this behavior.  If I hide a column by dragging it and check the width it is 0.  What version are you using?  Remember that columns are 0-based so make sure you are querying the correct column.  The default width is 60 so it sounds like you are checking the wrong column.
  • Replied 8 September 2017, 4:35 am EST

    I use spread windows form 4.0,and column index is 6,so it is "g" <U>ColumnHeader, defaut </U>column width is 60, i don't know what is wrong.

  • Replied 8 September 2017, 4:35 am EST

    How are you querying the width of the column?
  • Replied 8 September 2017, 4:35 am EST

    Hello,


    When you hide a column (Columns(6).Visible = False), this does not change the width of the column. So when you are calculating width's of columns, you need to check the Visible property as well.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels