Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[platform-swt-dev] Motif Scrollable and H/V_SCROLL bars

We are trying to calculate whether it is necessary to show scrollbars or not. To do this, we do:
canvas.getHorizontalScrollbar().getSize().y

This works on Windows, but on Motif it doesn't work. The dimension returned is too small, causing us to overestimate the resulting client area once the scollbar is set visible.

How can I ask a Canvas how much space scroll bar "x" *would* occupy if it were visible? In other words, what is the clientArea for the Canvas with both scrollbars visible, but i want to know without setting them visible. (Also, need to account for possible SWT.BORDER style bit).

Back to the top