Hi,

Is it possible to get a horizontal scrollbar in a grid when the total width of the grid columns is wider than the cell in which the grid is placed? Currently it just cuts of the grid at the cell width. Maybe some css trick?

Thanks, Michiel A.

asked 19 Jun '12, 04:02

Michiel%20A's gravatar image

Michiel A
5161543
accept rate: 13%


Hi Michiel,

It is not possible to have horizontal scrollbar in Grid component.

But there is a work around. You may create new Panel which has Static PreferredWidthPolicy. Place your grid into this new Panel. And set preferredWidth attribute of Panel to width of Grid.

But when you add/remove columns from Grid on runtime with APIs, you need to set preferredWidth value of Panel using api_panel.setPreferredSize API to new width of Grid.

link

answered 19 Jun '12, 06:10

Samet%20Basaran's gravatar image

Samet Basaran
1372
accept rate: 24%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×85
×7
×3

Asked: 19 Jun '12, 04:02

Seen: 1,821 times

Last updated: 19 Jun '12, 06:10


© Copyright Gerger 2017