Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Empty table row height.
Empty table row height. [message #806046] Fri, 24 February 2012 13:33 Go to next message
Lorand Lorincz is currently offline Lorand LorinczFriend
Messages: 35
Registered: April 2011
Member
Hello,

I need to set o custom height to my tables. Listening to SWT.MeasureItem events works when i have items in my table, but when I have an empty table it doesn't work.
Any ideas?
Thanks in advance.

      
viewer.getTree().addListener(SWT.MeasureItem, new Listener() {
         public void handleEvent(Event event) {
            event.height = 30;
         }
      });
Re: Empty table row height. [message #808185 is a reply to message #806046] Mon, 27 February 2012 14:10 Go to previous messageGo to next message
Lakshmi ShanmugamFriend
Messages: 274
Registered: July 2009
Location: India
Senior Member
Hi,

SWT.MeasureItem is sent before an item is drawn and setting event.height sets the height of the tree items. In an empty table, there are no items, so what height are you trying to set?

Here is a detailed article on Custom Drawing in Table and Tree Items


Lakshmi P Shanmugam

[Updated on: Mon, 27 February 2012 14:18]

Report message to a moderator

Re: Empty table row height. [message #809188 is a reply to message #808185] Tue, 28 February 2012 15:25 Go to previous message
Lorand Lorincz is currently offline Lorand LorinczFriend
Messages: 35
Registered: April 2011
Member
Hi Lakshmi Shanmugam and thanks for the response.

Although i have an empty table/tree the grid lines are still drawn, so I still need to be able to change the row height.

I found a bug report regarding this problem https://bugs.eclipse.org/bugs/show_bug.cgi?id=134454
Previous Topic:Browser.setUrl(arg0,arg1,arg2)
Next Topic:New widget and user defined styles
Goto Forum:
  


Current Time: Sun Dec 21 12:13:11 GMT 2014

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

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