I have a TableCell in a Table (both are "runat=server"). My program
dynamically generates ASP:Button controls and puts them inside the
HtmlTableCell. The Buttons are put at absolute positions using the
"position: absolute; top: 10px; left: 20px" style properties (of couse,
the top and left values are different for each different button). Inside
my table cell, I use GridLayout instead of FlowLayout (default). Here's
is a simple skeletion of my code:
<table id=table runat=server>
<tr id=row runat=server>
<td id=cell runat=server ms_position=GridLayout></td>
There is a function in my C# code that creates the buttons,
automatically calculates the top and left positions of each button and
then add the button to the table cell. My code for adding looks
something like this:
Button b = new Button();
So far, everything works well. However, if a Button is placed so that
some parts of it is outside the bounds of the TableCell, it just sticks
outside of the cell. I want that cell to automatically increase or
decrease in width to fit the button. Also, if the cell size reachs a
certain length (which I can specify), either the Button should be
clipped, or there should be scrollbars inside the cell that will allow
me to scroll over to see the whole button. I cannot find a way to do
My explanation may be confusing, but if you follow these steps, you will
see what I am taking about:
1) In the Forms Designer, drag in an HtmlTable control
2) Create a row and a cell for that table
3) Make the width of the cell be 50 px.
4) In the HTML code, add "ms_positioning=GridLayout" to the <td> tag.
(In your Designer, you should now see the "grid dots" inside that cell)
5) Now, drag a Button web server control into that cell.
6) Place the Button so that half of it is outside the boundaries of the
7) Run your program.
You will notice that the Button appears "on top" of your table, and not
inside that cell. How come?
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!