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 08:33 Go to next message
Lorand Lorincz is currently offline Lorand Lorincz
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 09:10 Go to previous messageGo to next message
Lakshmi Shanmugam
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 09:18]

Report message to a moderator

Re: Empty table row height. [message #809188 is a reply to message #808185] Tue, 28 February 2012 10:25 Go to previous message
Lorand Lorincz is currently offline Lorand Lorincz
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: Sat Apr 19 03:08:16 EDT 2014

Powered by FUDForum. Page generated in 0.05515 seconds