Bug 347694 - getting client area makes horizontal scrollbar not appear
Summary: getting client area makes horizontal scrollbar not appear
Status: RESOLVED WORKSFORME
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.7   Edit
Hardware: PC Linux-GTK
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2011-05-30 16:20 EDT by Grant Gayed CLA
Modified: 2018-05-14 14:01 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Grant Gayed CLA 2011-05-30 16:20:05 EDT
- 3.7RC3 build
- observed on RHEL6 on PPC64, probably happens on all gtk platforms

- run the snippet below, note that its horizontal scrollbar appears fine
- now uncomment the line in the MeasureItem listener, run the snippet again, and note that the needed horizontal scrollbar is not shown

public static void main(String[] args) {
    Display display = new Display();
    Shell shell = new Shell(display);
    shell.setBounds(10,10,200,250);
    final Table table = new Table(shell, SWT.NONE);
    table.setBounds(10,10,100,200);
    table.setLinesVisible(true);
    for (int i = 0; i < 5; i++) {
        new TableItem(table, SWT.NONE).setText("an item that's a bit long " + i);
    }
    table.addListener(SWT.MeasureItem, new Listener() {
        public void handleEvent(Event event) {
            //    table.getClientArea(); // <---
        }
    });
    shell.open();
    while (!shell.isDisposed()) {
        if (!display.readAndDispatch()) display.sleep();
    }
    display.dispose();
}
Comment 1 Eric Williams CLA 2018-05-14 14:01:56 EDT
I cannot reproduce this issue on 4.8 M7, GTK3.22, and Fedora 28. Please comment if the issue reappears.