Grid item resize [message #19350] |
Mon, 04 December 2006 11:54 |
Eclipse User |
|
|
|
Originally posted by: swetha.atc.tcs.co.in
Hi All,
I am facing two problems in Nebula Grid,
1. How can we set the height of the grid Item... I want to increase the
size of the grid item vertically..
I can able set the size of the grid Item in terms of Width...(i.e;
horizontally)..
I am displaying image in a cell, as the image is bigger, the image is
not completely visible in a Grid.
Please help in this regard.
2. Another requirement is based on the size of the grid(I perform
resizing of grid) and size of the image, it will automatically calculate
the number of grid columns...
Problem is suppose there are 2 columns in the grid.. and after
performing the resizing operation, the calculated number of cells is
5...these 5 columns were appended to the already existing 2 columns...
I want to set the number of columns to zero and then adding the newly
cal no of cols...
Please help me ...
|
|
|
|
Re: Grid item resize [message #19625 is a reply to message #19444] |
Tue, 05 December 2006 04:42 |
Eclipse User |
|
|
|
Originally posted by: sujji_minnu.yahoo.co.in
Hi Chris,
Thanks for the reply,
For the Reply 2):
I already tried with gridColumn#dispose.... but its not disposing.
Instead whenever I perform resizing operation, number of cols increased as
well as the data is displayed in some random order...not in continuous
cols starting with the first one....
The following is the code I am using,
public void reConstructGrid(){
grid.removeAll();
for(int i1=0;i1<grid.getColumnCount();i1++){
grid.getColumn(i1).dispose();
}
for(int i=0;i<GlobalVariablesClass.cols;i++){
GridColumn column=new GridColumn(grid,SWT.NONE);
column.setResizeable(true);
column.setWidth(100);
}
}
And for the reply 1):
I am placing only only one icon...in the grid in the first row and
first col only....Still its not totally visible..
grid = new Grid(sash_form,SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
gridItem = new GridItem(grid, SWT.NONE);
gridItem.setImage(0, Util.getImageRegistry().get("file"));
I am placing only the image in the first item first col... still its not
showing complete image...
Do I need to set any option for the grid...?
|
|
|
|
Re: Grid item resize [message #19752 is a reply to message #19715] |
Wed, 06 December 2006 05:05 |
Eclipse User |
|
|
|
Originally posted by: sujji_minnu.yahoo.co.in
Hi,
Thanks for the response....
2) What is the wrong with the loop for disposing the number of existing
cols...
I am just removing the existing number of cols in the first loop and
then adding the required number of cols in the second loop...
Please throw a light on this... I didn't get what is the wrong with it..
1) When can I expect setItemHeight to be available....Mean while..is
there any other way other than writing our own custom cell renderer...
Once again Thanks lot..
|
|
|
|
|
Re: Grid item resize [message #20038 is a reply to message #19834] |
Thu, 07 December 2006 04:01 |
Eclipse User |
|
|
|
Originally posted by: sujji_minnu.yahoo.co.in
Hi,
Thanks Tom, while loop for grid cols disposing worked....
one more question which I already mentioned is, how to set the grid Item
Height,
do u have any idea other than custom cell renderer.....
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.07855 seconds