c# - TableLayoutPanel Winforms not showing all information -



c# - TableLayoutPanel Winforms not showing all information -

i have unusual set of circumstances can't seem work. allow know have , see if can set me right. (the below represents closest have been able want).

the thought when day selected show usercontrol has lorry's deliveries day. thing date may range. hence have next setup far:

i have

tablelayoutpanel (dock = fill; 1 column (100percent); 1 row (autosize).

then each selected has user command (ucschedulerday) added row tablelayoutpanel. take single day example, have this:

tablelayoutpanel (dock = fill; 1 column (100%); 1 row (autosize). - (row1 column1) ucschedulerday

so ucschedulerday user command houses groupbox (dock=fill) , flowlayoutpanel (also dock=fill within groupbox)

for each lorry have usercontrol added flowlayoutpanel (these have fixed width) have next 1 single day

tablelayoutpanel (as above (also forgot mention autoscrollbars=true) - (row 1 column 1) ucschedulerday (dock=fill(done in code when added)) - groupbox (dock=fill) - flowlayoutpanel (dock=fill) - uclorryday1 - uclorryday2

works fine long lorries fit on screen (see above), 1 day 2 lorries(or 5 on monitor) it's ok. however, if select 2 days or create screen smaller, instead of showing scroll bars having same layout, cuts of uclorrydays , doesn't display others.

note on above pic how gray lorry cutting off, scroll bar doesn't extend far.

i don't understand why isn't working. appreciate help on this, please allow me know if need more information.

ok, think nested groupbox/usercontrol-groupbox thought went wrong. have fixed updating original form following:

pnllorries.controls.clear(); datetime dt_start = monthview1.selectionstart; datetime dt_end = monthview1.selectionend; int rowcounter = 0; (datetime dt = dt_start; dt.date <= dt_end; dt = dt.adddays(1)) { label lbl = new label(); font ft = new system.drawing.font("calibri", 12); lbl.text = dt.toshortdatestring(); lbl.font = ft; pnllorries.controls.add(lbl, 0, rowcounter); rowcounter++; flowlayoutpanel pnl = new flowlayoutpanel(); pnl.dock = dockstyle.fill; pnl.autosize = true; datatable tbl = cdalsettings.db.getcannedtable("select * lorry"); // add together these controls panel... foreach (datarow row in tbl.rows) { uclorryday ld = new uclorryday(dt, ctypes.toint(row["id"]), this); pnl.controls.add(ld); } pnllorries.controls.add(pnl, 0, rowcounter); rowcounter++; }

so create , add together in label. downside of course of study not in neat little box when did way groupbox came same results experiencing before. suppose problem panel within panel (inception style).

c# winforms autosize tablelayoutpanel

Comments

Popular posts from this blog

assembly - What is the addressing mode for ld, add, and rjmp instructions? -

vowpalwabbit - Interpreting Vowpal Wabbit results: Why are some lines appended by "h"? -

Is there a way to convert an HTML page styled with Bootstrap CSS into email-compatible html? -