Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 90321 - hiding/showing scrollbars causes flash
Summary: hiding/showing scrollbars causes flash
Status: RESOLVED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.1   Edit
Hardware: PC Linux-Motif
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Grant Gayed CLA
URL:
Whiteboard:
Keywords:
: 26889 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-04-05 12:57 EDT by Grant Gayed CLA
Modified: 2012-06-20 11:40 EDT (History)
3 users (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 2005-04-05 12:57:23 EDT
3.1M6

- run the following snippet
- each click on the white Composite will show/hide its horizontal scrollbar
- this will often show a flash, even though the Composite specifies style
NO_BACKGROUND

public static void main(String[] args) {
	final Display display = new Display();
	Shell shell = new Shell(display);
	shell.setBounds(10,10,200,400);
	final Composite composite = new Composite(shell, SWT.NO_BACKGROUND | SWT.H_SCROLL);
	composite.setBounds(10,10,100,300);
	composite.addPaintListener(new PaintListener() {
		public void paintControl(PaintEvent e) {
			e.gc.setBackground(display.getSystemColor(SWT.COLOR_WHITE));
			e.gc.fillRectangle(composite.getClientArea());
		}
	});
	composite.addListener(SWT.MouseDown, new Listener() {
		public void handleEvent(Event event) {
			ScrollBar hBar = composite.getHorizontalBar();
			hBar.setVisible(!hBar.getVisible());
		}
	});
	shell.open();
	while (!shell.isDisposed()) {
		if (!display.readAndDispatch()) display.sleep();
	}
	display.dispose();
}
Comment 1 Grant Gayed CLA 2005-04-21 16:12:24 EDT
*** Bug 26889 has been marked as a duplicate of this bug. ***
Comment 2 Grant Gayed CLA 2012-06-19 14:22:02 EDT
Work is discontinued on SWT's Motif port.
Comment 3 Grant Gayed CLA 2012-06-20 11:40:43 EDT
Closing report, platform is discontinued.