Panel with Sroll
-
Hi All, i have a panel (server control)with a specify height , it extends in the web page when the content r large. Is there any solution so that the height wont increase & show the scrollbar.:confused: Thanks
Hi there, You can use the overflow-y CSS property, e.g.
Label l = new Label(); l.Text = "This panel contains a label control which has a large amount of text. Text that does not fit will be clipped and hidden."; Panel1.Style\["overflow-y"\] = "hidden"; Panel1.Controls.Add(l);
Hope this helps, Andy
-
Hi there, You can use the overflow-y CSS property, e.g.
Label l = new Label(); l.Text = "This panel contains a label control which has a large amount of text. Text that does not fit will be clipped and hidden."; Panel1.Style\["overflow-y"\] = "hidden"; Panel1.Controls.Add(l);
Hope this helps, Andy
-
Thx Andy for ur reply the panel doesent extend but the rest of the panel content doesent appear, is there anyway that the panel have a scrollbar so all the content could appear by scrolling???
Hi, Yes - rather than setting to "hidden", try setting it to "auto" As well as affecting the Y-axis, you can use overflow-x to change the horizontal behaviour. Or you can use overflow to change both horizontal and vertical. Here's the link to MSDN if you want more info. Hope this helps, Andy
-
Hi, Yes - rather than setting to "hidden", try setting it to "auto" As well as affecting the Y-axis, you can use overflow-x to change the horizontal behaviour. Or you can use overflow to change both horizontal and vertical. Here's the link to MSDN if you want more info. Hope this helps, Andy