Sizing Table Columns

I’m trying to automatically size a tables columns based on percentages of total width. However, the only event I can find where it works is the tables focusGained event which requires someone to click the table to format the column widths. I assume this is because the total width of the table is still that of design time for other ealier events such as the windows internalFrameActivated event. How could I get this to work when the window is opened initially?

Unfortunately, the only way to do this right now is to manually click the columns in preview mode:

  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
1 Like

But what happens if the final screen size is different than that at design time? I want the total sum of all column widths to equal 100% with some columns being larger than others.

What do you mean 100%, 100% of the screen width? If the final screen size is different, the table and its column widths will scale by the size factor between designer screen and client screen, maintaining the aspect ratio of the designer screen. This is assuming the layout for the component is set to relative, it can be set to anchored, which will leave the table and column widths the exact size as they are in the designer.

By ‘the component’ do you mean the table? I don’t see a property called ‘layout’

Yeah, sorry, I meant the table. Right click on the table and you should see the layout option.