Equal sized Column Width

How would I go about making the columns automatically go equal width to fill the width of the row?

Thank you.

I’m reading through old posts and I noticed this interesting question was never answered. I realize this “might be a bit late.” (Pun intended.) It looks like the following approach would work…

Say you have five columns of varying data types.

  1. Short Text
  2. Short Text
  3. Date
  4. Short Text
  5. Long Text

If you place this table as a component on a page and leave the column widths set to the default (“Auto”), Tadabase is going to be calculating actual display widths on the fly based on what I expect is a rather complicated algorithm, looking at not just the data types (date fields can generally be assumed to be narrow, long text fields cannot) but also at the actual data in the columns. In the following screenshot, all the columns were formatted to use the Auto width setting.

But you can force them all to be the same width by entering custom widths for all of the fields, and making the widths the same value.

This is a bit counterintuitive. The Format tab of the column settings dialog for the table component indicates that a custom width will use the unit Pixels. So if you set all five columns to a custom width of “100” (Pixels), and if (like me) you’re a literalist, you naturally expect the table to be displayed as a 500-pixel wide table, with each column being 100 pixels wide.

Well, that’s not what happens. Instead, Tadabase seems to be comparing the custom width values, seeing that they’re all the same, and concluding that it should make the columns all equal widths. And then it gets the actual available display width of the current browser window and distributes the columns across that width. In the following screenshots, all the columns were set to a custom width of “100”.

It’s been a while since I last coded an HTML page from scratch but I seem to recall that, when you’re coding a normal HTML table object, it’s possible to specify column widths as percentages and also as fixed widths. In Tadabase, it looks like the only option (other than Auto) is fixed widths — but Tadabase interprets that as relative percentages.

Final note: If you play around with a combination of different fixed widths (say, 500 for one column and 100 each for the other four), or if you combine auto-width with fixed widths, you can usually get the table to format pretty much as you would like.