Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Nebula » Grid - Cell Height
Grid - Cell Height [message #17931] Tue, 28 November 2006 15:22 Go to next message
Eclipse User
Originally posted by: x_naren.hotmail.com

How to set cell height in Grid?

Naren
Re: Grid - Cell Height [message #17963 is a reply to message #17931] Tue, 28 November 2006 16:52 Go to previous messageGo to next message
Chris Gross is currently offline Chris Gross
Messages: 253
Registered: July 2009
Senior Member
This is currently only possible if you write your own custom cell renderer.

-Chris

Naren wrote:
> How to set cell height in Grid?
>
> Naren
>
Re: Grid - Cell Height [message #20439 is a reply to message #17963] Tue, 12 December 2006 10:53 Go to previous messageGo to next message
Eclipse User
Originally posted by: x_naren.hotmail.com

Hi Chris,

While I was trying to do this I noticed that

void newItem(GridItem item, int index) {
..............

if (items.size() == 1)
rowHeight = computeRowHeight(sizingGC);
}

which means that rowHeight is based on row 1 and is computed once during
the creation and cannot be changed later

say, If I create
class MyTable extends Grid

and still cannot override either
newItem (package access)
computeRowHeight (private)
rowHeight (private)

In my case, I need to set the itemheight if the shell is resized (all the
rows will be of same height). I tried to change font height to reflect
this, font in the table changes but not the item height.

Please, let me know if there is any other way to reflect this behavior.

Thanks

Naren

Chris Gross wrote:

> This is currently only possible if you write your own custom cell renderer.

> -Chris

> Naren wrote:
>> How to set cell height in Grid?
>>
>> Naren
>>
Re: Grid - Cell Height [message #21026 is a reply to message #20439] Tue, 12 December 2006 10:56 Go to previous message
Chris Gross is currently offline Chris Gross
Messages: 253
Registered: July 2009
Senior Member
I'm working on setItemHeight in Grid.

Naren wrote:
> Hi Chris,
>
> While I was trying to do this I noticed that
> void newItem(GridItem item, int index) {
> ..............
>
> if (items.size() == 1)
> rowHeight = computeRowHeight(sizingGC);
> }
>
> which means that rowHeight is based on row 1 and is computed once during
> the creation and cannot be changed later
>
> say, If I create
> class MyTable extends Grid
> and still cannot override either
> newItem (package access)
> computeRowHeight (private)
> rowHeight (private)
>
> In my case, I need to set the itemheight if the shell is resized (all
> the rows will be of same height). I tried to change font height to
> reflect this, font in the table changes but not the item height.
>
> Please, let me know if there is any other way to reflect this behavior.
>
> Thanks
>
> Naren
>
> Chris Gross wrote:
>
>> This is currently only possible if you write your own custom cell
>> renderer.
>
>> -Chris
>
>> Naren wrote:
>>> How to set cell height in Grid?
>>>
>>> Naren
>>>
>
>
Re: Grid - Cell Height [message #569699 is a reply to message #17931] Tue, 28 November 2006 16:52 Go to previous message
Chris Gross is currently offline Chris Gross
Messages: 471
Registered: July 2009
Senior Member
This is currently only possible if you write your own custom cell renderer.

-Chris

Naren wrote:
> How to set cell height in Grid?
>
> Naren
>
Re: Grid - Cell Height [message #572644 is a reply to message #17963] Tue, 12 December 2006 10:53 Go to previous message
Naren is currently offline Naren
Messages: 8
Registered: July 2009
Junior Member
Hi Chris,

While I was trying to do this I noticed that

void newItem(GridItem item, int index) {
..............

if (items.size() == 1)
rowHeight = computeRowHeight(sizingGC);
}

which means that rowHeight is based on row 1 and is computed once during
the creation and cannot be changed later

say, If I create
class MyTable extends Grid

and still cannot override either
newItem (package access)
computeRowHeight (private)
rowHeight (private)

In my case, I need to set the itemheight if the shell is resized (all the
rows will be of same height). I tried to change font height to reflect
this, font in the table changes but not the item height.

Please, let me know if there is any other way to reflect this behavior.

Thanks

Naren

Chris Gross wrote:

> This is currently only possible if you write your own custom cell renderer.

> -Chris

> Naren wrote:
>> How to set cell height in Grid?
>>
>> Naren
>>
Re: Grid - Cell Height [message #572705 is a reply to message #20439] Tue, 12 December 2006 10:56 Go to previous message
Chris Gross is currently offline Chris Gross
Messages: 471
Registered: July 2009
Senior Member
I'm working on setItemHeight in Grid.

Naren wrote:
> Hi Chris,
>
> While I was trying to do this I noticed that
> void newItem(GridItem item, int index) {
> ..............
>
> if (items.size() == 1)
> rowHeight = computeRowHeight(sizingGC);
> }
>
> which means that rowHeight is based on row 1 and is computed once during
> the creation and cannot be changed later
>
> say, If I create
> class MyTable extends Grid
> and still cannot override either
> newItem (package access)
> computeRowHeight (private)
> rowHeight (private)
>
> In my case, I need to set the itemheight if the shell is resized (all
> the rows will be of same height). I tried to change font height to
> reflect this, font in the table changes but not the item height.
>
> Please, let me know if there is any other way to reflect this behavior.
>
> Thanks
>
> Naren
>
> Chris Gross wrote:
>
>> This is currently only possible if you write your own custom cell
>> renderer.
>
>> -Chris
>
>> Naren wrote:
>>> How to set cell height in Grid?
>>>
>>> Naren
>>>
>
>
Previous Topic:New Nebula Presentation Component...
Next Topic:Right click event
Goto Forum:
  


Current Time: Sat Apr 19 09:08:32 EDT 2014

Powered by FUDForum. Page generated in 0.03900 seconds