Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JFace » OwnerDrawLabelProvider ignores setting event.height
OwnerDrawLabelProvider ignores setting event.height [message #727637] Wed, 21 September 2011 18:07 Go to next message
Thomas Singer is currently offline Thomas SingerFriend
Messages: 75
Registered: July 2009
Member
I'm currently trying to increase our table row heights by setting a larger value to event.height in OwnerDrawLabelProvider.measure (Windows XP and Windows 7, SWT/JFace 3.7.0). Unfortunately, no matter what value I set, the table row height remains the same. I've debugged a little bit and found out, that in Table.sendMeasureItemEvent always setItemHeight is invoked with the designed height, so for some magic reason Windows (?) ignores it. Does anybody has a (vague) idea what could be the reason?

Tom
Re: OwnerDrawLabelProvider ignores setting event.height [message #727672 is a reply to message #727637] Wed, 21 September 2011 19:22 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Did you looked at
http://dev.eclipse.org/viewcvs/viewvc.cgi/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet010OwnerDraw.java?view=markup
which controls the height of a table-rows.

My current wild guess is that you miss a line like this:

OwnerDrawLabelProvider.setUpOwnerDraw(viewer);

Tom
Am 21.09.11 20:07, schrieb Thomas Singer:
> I'm currently trying to increase our table row heights by setting a
> larger value to event.height in OwnerDrawLabelProvider.measure (Windows
> XP and Windows 7, SWT/JFace 3.7.0). Unfortunately, no matter what value
> I set, the table row height remains the same. I've debugged a little bit
> and found out, that in Table.sendMeasureItemEvent always setItemHeight
> is invoked with the designed height, so for some magic reason Windows
> (?) ignores it. Does anybody has a (vague) idea what could be the reason?
>
> Tom
Re: OwnerDrawLabelProvider ignores setting event.height [message #727907 is a reply to message #727672] Thu, 22 September 2011 07:58 Go to previous messageGo to next message
Thomas Singer is currently offline Thomas SingerFriend
Messages: 75
Registered: July 2009
Member
Tom Schindl wrote on Wed, 21 September 2011 15:22
Did you looked at
http://dev.eclipse.org/viewcvs/viewvc.cgi/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet010OwnerDraw.java?view=markup
which controls the height of a table-rows.

My current wild guess is that you miss a line like this:

OwnerDrawLabelProvider.setUpOwnerDraw(viewer);

I've tried this sample yesterday and it worked fine, even when uncommenting the deprecated OwnerDrawLabelProvider.setUpOwnerDraw(viewer);

Ownerdraw works fine in our project, too. Only the event.height is ignored, event.width is respected.

Tom
Re: OwnerDrawLabelProvider ignores setting event.height [message #729555 is a reply to message #727907] Mon, 26 September 2011 13:37 Go to previous message
Thomas Singer is currently offline Thomas SingerFriend
Messages: 75
Registered: July 2009
Member
Just for the records: the problem was our use of setParent(), see bug 358872.
Previous Topic:StyledCellLabelProvider right aligned text
Next Topic:[Databinding] What do you think about manage JFace Databinding with Annotation?
Goto Forum:
  


Current Time: Fri Apr 19 23:35:34 GMT 2024

Powered by FUDForum. Page generated in 0.04261 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top