c# - Making TableLayoutPanel Act Like An HTML Table (Cells That Resize Automatically Around Text) -


i'm trying build tablelayoutpanel on winform , want behave plain old html table.

one requirement table needs built programmatically. have far:

foreach (var rowlinq in resultlinq) {     richtextbox rt = new richtextbox();     rt.borderstyle = borderstyle.none;     rt.text = rowlinq.result.resultname;     rt.dock = dockstyle.fill;      tablelayoutpanel.rowcount++;     tablelayoutpanel.rowstyles.add(new rowstyle(system.windows.forms.sizetype.autosize));     tablelayoutpanel.controls.add(rt1, 0, tablelayoutpanel5.rowcount - 1); } 

so builds row each row in linq result. works pretty except 1 thing: height doesn't adjust @ , fixed. need height grow , shrink depending on height of text inside each cell.

i need 1 big time, stack-o

set autosize property true.


Comments

Popular posts from this blog

ruby - When to use an ORM (Sequel, Datamapper, AR, etc.) vs. pure SQL for querying -

php - PHPDoc: @return void necessary? -

c++ - Convert big endian to little endian when reading from a binary file -