开发者

adjusting resizable bar width of listgrid

In my ui there is a listgrid for which i set size 500

dataGrid=new ListGrid();
dataGrid.setWidth(500);

I want to use resizable bar for listgrid

dataGrid.setShowResizeBar(true);

but default width for resizable bar is >300 which makes my ui not good looking.

Is there any way to set resizable bar width exact to 500开发者_如何学Python or any size?

Thanks


I don't know how your UI looks so it is hard to judge, but I would prefer using setCanDragResize(Boolean canDragResize) and defining the resizing directions with setResizeFrom(String... resizeFrom).

See the showcase example. Hope this helps!


You can set the default width for any resizable column in a ListGrid using ListGridField.setWidth() as follows:

// first create the grid and set columns to be resizable
dataGrid=new ListGrid();
dataGrid.setWidth(500);
dataGrid.setShowResizeBar(true);
dataGrid.setCanDragResize(true);

// set each column to the initial width you want for that column

ListGridField myColumn= new ListGridField("myColumn", "My Column");
myColumn.setWidth(400);  // default to 400 pixels wide

ListGridField myAnotherColumn= new ListGridField("myAnotherColumn", "Another Column");
myAnotherColumn.setWidth(300);  // default to 300 pixels wide


dataGrid.setFields(myColumn, myAnotherColumn);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜