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
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.
answered 19 Jun '12, 06:10