Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » RAP Table adds height of horiz scroll bar(RAP Table height inconsistent with SWT by h scroll bar height)
RAP Table adds height of horiz scroll bar [message #997566] Tue, 08 January 2013 06:47 Go to next message
John Gymer is currently offline John Gymer
Messages: 185
Registered: November 2012
Location: UK
Senior Member
Hello,

I've noticed that there is an inconsistency between RAP and SWT when it comes to the height of Tables. Essentially, in RAP, the height of the Table is extended downward to include the height of the horizontal scroll bar.

This means that in RAP I need to reduce the overall Table height by the height of the h Scroll Bar.

The width of the Table is not affected in the same way i.e. it does NOT add the width of the vertical scroll bar to the total Table width.

To get around this difference in single-sourcing, it is easy enough as follows (trivial example):

... create Table ...
int myTableHeight = 200;
if (runningAsRAP) {
  ScrollBar hScrollBar = myTable.getHorizontalBar();
  if (hScrollBar != null) {
    myTableHeight -= hScrollBar.getSize().y;
  }
}
... then FormData Layout to position and size the Table ...
fd = new FormData();
fd.left = new FormAttachment(0, myTableX);
fd.top = new FormAttachment(0, myTableY);
fd.width = myTableWidth;
fd.height = myTableHeight;
myTable.setLayoutData(fd);
...


Is this a bug, or a deliberate difference? Obviously I'd rather not have to code this specially, and it appears to me to be a bug, especially considering that the vertical scroll bar does not have a similar effect on width of the Table?

Am using RAP 2.0 M4 Nightly from 3rd Jan 2013.

Thanks, John


---
Just because you can doesn't mean you should
Re: RAP Table adds height of horiz scroll bar [message #1001923 is a reply to message #997566] Thu, 17 January 2013 10:04 Go to previous message
John Gymer is currently offline John Gymer
Messages: 185
Registered: November 2012
Location: UK
Senior Member
I'll raise a BugZilla for this... I think the problem also exists inside ComputeTrim for a Table.
Link: https://bugs.eclipse.org/bugs/show_bug.cgi?id=398403


---
Just because you can doesn't mean you should

[Updated on: Thu, 24 January 2013 06:09]

Report message to a moderator

Previous Topic:JS-libraries in custom widgets
Next Topic:RAP field focus lost when moving window
Goto Forum:
  


Current Time: Tue Jul 22 17:35:29 EDT 2014

Powered by FUDForum. Page generated in 0.02265 seconds