Tables and Scroll Bars

For questions and postings not covered by the other forums
ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Tables and Scroll Bars

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:07 pm

by MichaelHill >> Thu, 4 Apr 2002 4:33:27 GMT

Afternoon All,

I have a query about tables and the vertical scrollbar. I have a case where my table has less than a page of details, so no scroll bar is showing, but I get a white space between the last header (for the table) and the edge of the table. If you go over the number of records this is filled with the scrollbar. Does anyone have any idea what I'm doing wrong, or how I can fix this problem?

Cheers

Michael Hill
Gallagher Group Ltd

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Tables and Scroll Bars

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:07 pm

by cdshearer >> Thu, 4 Apr 2002 5:39:53 GMT

Hi Michael

You're not doing anything wrong... it's just that the JADE table control isn't smart enough to do what you want.

The first few releases of JADE had no concept of automatically sizing table columns, so they were whatever size the developer set them to, or the default size that JADE provides... 60 pixels, I think, if not set.

In recent releases there is an autoSize property that lets you allow the Table control to automatically size columns and rows to fit their contents. This kindof works, but does have some issues. I think if the user resizes a column then it remembers that size and then doesn't resize again. Also, for tables that have been virtualised, the column width is calculated (naturally) on the current contents, so when you scroll to a new page of contents the size of the columns can alter, this looks pretty awful!

What is really needed is some way of telling the table the preferred column sizes. I have done some work on table controls that allows you to set column widths as percentages of the available width, and also allows setting them to a fixed number of pixels. Then when the available width changes (when the scrollbar appears or disappears) the columns automatically resize. Unfortunately, the code is pretty complex, but even worse, it relies on the paint event to detect the change in clientWidth of the control, so does tend to "flash" on thin client systems.

More commonly, some controls in other environments allow you to specify that the last column automatically stretches to fill the available width. It would be great if the JADE table control could do this.

Craig.


Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 18 guests