Row Autosize property not working of Table Layout?

前端 未结 2 371
温柔的废话
温柔的废话 2021-01-29 05:32

I am working on a windows application, in which i am using a table layout panel, in this table layout i have created 5 rows and that is autosize, now dynamically i am adding 4 r

2条回答
  •  抹茶落季
    2021-01-29 06:34

    Try setting the radio buttons autosize property to true.

    And remember that a control in a TableLayoutPanel cell always shrinks to fit in the cell until its MinimumSize is reached.

    P.S. You could also try setting the AutoSizeMode property to GrowOnly.

    See MSDN for more info

    EDIT: try this...

    .RowStyles.Clear();
    .RowStyles.Add(new RowStyle(SizeType.AutoSize));
    

提交回复
热议问题