0

How to make grid flex horizontally

asked 2009-07-15 20:49:55 +0800

jj gravatar image jj
638 3

I have a grid in a panel, and if the panel width expands, I'd like the grid to expand accordingly. Currently, only the grid border extends, but the column widths still remain the same. Is there any way with the grid component to achieve automatic expansion, like a html table?
Thanks.

delete flag offensive retag edit

5 Replies

Sort by ยป oldest newest

answered 2009-07-16 01:30:41 +0800

woodyki gravatar image woodyki
168

Use percentage width (e.g. 100%) instead of use absolute width value.

link publish delete flag offensive edit

answered 2009-07-16 01:45:15 +0800

jj gravatar image jj
638 3

That was exactly I tried, with no success.

link publish delete flag offensive edit

answered 2009-07-16 03:18:08 +0800

SergeTk gravatar image SergeTk
193 3

updated 2009-07-16 03:19:03 +0800

fixedLayout to true

link publish delete flag offensive edit

answered 2009-07-16 21:00:57 +0800

jj gravatar image jj
638 3

@SergeTK, Thanks. That worked. I always thought that fixedLayout meaning you have to speicify px width for columns.
Now, not being greedy, but when the panel width decreases, the grid can shrink to such a small size that the content is cut off. Is there a way to get a scroll bar when the data size is bigger than the container allowed, and able to expand when the container expands?

link publish delete flag offensive edit

answered 2009-07-17 04:43:53 +0800

SergeTk gravatar image SergeTk
193 3

updated 2009-07-17 04:46:22 +0800

I don't think so as component will adjust to fill the container.............. that the price for relative dimentions....... but then I really don't see it as a problem with shrinking surely user would realize he can't read the screen anymore and increase the size. Or you could write a custom js to mix relative and concrete dimentions...

Another way that could work is to use window or borderlayout and put grid as their children as they have properties which allow you to specify minWidth, minHeight which in turn don't allow component to be risized smaller then thouse properties......

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2009-07-15 20:49:55 +0800

Seen: 488 times

Last updated: Jul 17 '09

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More