Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Changing Table cell height
Changing Table cell height [message #558032] Thu, 09 September 2010 20:53 Go to next message
Missing name Mising name is currently offline Missing name Mising nameFriend
Messages: 16
Registered: May 2010
Junior Member
Hi all,
I wanted to make the cells of my table taller, and came across the following snippet of code to do so, from http:// www.java2s.com/Code/Java/SWT-JFace-Eclipse/ResizecolumnsasSW Ttableresizes.htm :

table.addListener(SWT.MeasureItem, new Listener() {
11 	   public void handleEvent(Event event) {
12 	      int clientWidth = table.getClientArea().width;
13 	      event.height = event.gc.getFontMetrics().getHeight() * 2;
14 	      event.width = clientWidth * 2;
15 	   }
16 	});


Problem is that there is no event called MeasureItem that I can find in RWT. Am I missing something, or is there some other way to change the height of cells in a table?

On the topic of resizing, is there also a way to change the height of the headers of ExpandItems? Basically I am trying to make these bigger for touch devices, so that they are easier to tap.

Thanks!
Re: Changing Table cell height [message #558039 is a reply to message #558032] Thu, 09 September 2010 21:18 Go to previous messageGo to next message
Missing name Mising name is currently offline Missing name Mising nameFriend
Messages: 16
Registered: May 2010
Junior Member
Hmmm, I kind of answered my own question Smile Changing the padding for the Table-Cell in the css is one way to make the cell taller. Of course the padding is applied to all sides, so this will also increase your left and right margins. This is ok, in my case, but is there still a better way?

ExpandItem headers are still getting me. Increasing the font size is not affecting the size of the bar at all.

-- Jim
Re: Changing Table cell height [message #558175 is a reply to message #558039] Fri, 10 September 2010 12:03 Go to previous message
Ralf Sternberg is currently offline Ralf SternbergFriend
Messages: 1313
Registered: July 2009
Senior Member

Hi Jim,

As you already discovered, there's no MeasureItem event in RAP. Theming
is the way to go. You can also specify different padding values for all
four edges of the cell.

Regarding ExpandItem: Do you increase the font size using CSS?

Regards, Ralf

Jim wrote:
> Hmmm, I kind of answered my own question :) Changing the padding for the
> Table-Cell in the css is one way to make the cell taller. Of course the
> padding is applied to all sides, so this will also increase your left
> and right margins. This is ok, in my case, but is there still a better way?
>
> ExpandItem headers are still getting me. Increasing the font size is not
> affecting the size of the bar at all.
>
> -- Jim


--
Ralf Sternberg

Need professional support for RAP and RCP?
http://www.eclipsesource.com/support/

Twitter: http://twitter.com/eclipsesource
Blog: http://www.eclipsesource.com/blogs/
Previous Topic:Tree Editor positions not synchronized on scrolling
Next Topic:EMF RAP issues.
Goto Forum:
  


Current Time: Sat Apr 20 02:53:08 GMT 2024

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

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

Back to the top