RAP Table adds height of horiz scroll bar [message #997566] |
Tue, 08 January 2013 11:47 |
|
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
|
|
|
|
Powered by
FUDForum. Page generated in 0.03535 seconds