Community
Participate
Working Groups
- run the snippet below, and note that the printed client rect y and top item bounds y are large numbers (> 700), but should both be around 0 public static void main(String[] args) { final Display display = new Display(); Shell shell = new Shell(display); Tree tree = new Tree(shell, SWT.NONE); tree.setBounds(10,10,300,300); for (int i = 0; i < 99; i++) { new TreeItem(tree, SWT.NONE).setText("root " + i); } tree.select(tree.getItem(55)); shell.pack(); shell.open(); System.out.println("client rect: " + tree.getClientArea()); TreeItem topItem = tree.getTopItem(); System.out.println("top item: " + topItem.getText()); System.out.println("top item bounds: " + topItem.getBounds()); while (!shell.isDisposed()) { if (!display.readAndDispatch()) display.sleep(); } display.dispose(); }
This is expected behaviour on Mac. The client area changes as you scroll the tree/table/list widget.