Setting column width in a table?

I have a dumb question.
how do you adjust the width of the columns in a table? I cant find anything in the table customizer.
thanks,

It’s not intuitive right now. This thread describes how to change column width.

[quote]In order to set the column widths of a table do the following:

  1. Go into preview mode in the designer
  2. Set the column widths by resizing columns
  3. Leave preview mode
  4. Go into Table customizer by right clicking on the table
  5. Press OK to save

Now the widths are saved. Next time you open the window they will be the same.[/quote]

Thanks!
i knew i was missing something simple!

The method described for setting table column widths doesn’t work for me. What is the function for setting a column width in a script?

You just need to modify the width column of the appropriate for on the column attributes dataset. You can use system.dataset.setValue to do that in scripting.

I figured why the preview mode settings were not persistent. I didn’t have the table’s Auto-Resize Mode property set to Off. Once I did that, the client used the widths that I set in preview mode. I’ve got another question:

My table has four columns. I want the width of the first three to be static. I’ll use the method previously described to set those widths at design time. I want the width of the fourth column to expand to fill the width of the table (the table layout is anchored on the left and right sides). Can you think of a good way to do that?

By the way, before I realized that the Auto-Resize Mode property was my problem, I did some experimenting trying to set the widths through the table’s attributes dataset. That didn’t work too well for me, but using the table’s setColumnWidth funtion worked pretty well.

I don’t think you will be able to do that right now. When the table gets larger all of the columns get proportionally larger. In the designer you specify an initial size which we use to figure out a percentage of the total. When you set the auto resize mode to off then it is literally the size of the columns. You can’t mix the two modes together right now.

@larryjones

This can be done now. Set the Auto-Resize mode to “Last Column.” From there, set the other columns to any width, and the last one will automatically expand to fill the remaining space.