2012-08-17 40 views
2

如何在BlackBerry中將特定高度設置爲GridFieldManager如何在黑莓中將高度設置爲GridFieldManager

任何人都可以提供示例代碼嗎?

我從xml中獲取數據並將其添加到GridFieldManager,但我想設置GridFieldManager的高度併爲其指定SCROLLBAR。

+1

http://supportforums.blackberry.com/t5/Java-Development/GridFieldManager-USE-ALL-HEIGHT-USE-ALL-WIDTH/td-p/519007看看這個鏈接 – BBdev 2012-08-17 15:50:26

回答

1

我只想把GridFieldManagerVerticalFieldManager

VerticalFieldManager container = new VerticalFieldManager(VerticalFieldManager.VERTICAL_SCROLL | VerticalFieldManager.VERTICAL_SCROLLBAR); 
... 
GridFieldManager grid =... 
... 
container.add(grid); 
add(container); 

後設爲高度爲您container,而不是grid

+0

謝謝我的問題解決了 – mahesh141 2012-09-01 07:39:58

+0

mark作爲回答請 – 2012-09-01 09:04:59