Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 532883 - Combobox is getting cut on linux - size issue
Summary: Combobox is getting cut on linux - size issue
Status: CLOSED DUPLICATE of bug 500703
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.7   Edit
Hardware: PC Linux
: P3 critical (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-03-26 08:18 EDT by Shital Devalkar CLA
Modified: 2018-09-18 10:21 EDT (History)
2 users (show)

See Also:


Attachments
Combo-box getting cut on Linux (175.66 KB, image/png)
2018-03-26 08:18 EDT, Shital Devalkar CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Shital Devalkar CLA 2018-03-26 08:18:12 EDT
Created attachment 273299 [details]
Combo-box getting cut on Linux

Combobox is devided into two parts where left part is inactive and right part is active showing half of the selected text.

Combobox shows full text on Windows.

Run below code to reproduce the issue on Linux.

ComboSizeIssue.java 

import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;

public class ComboSizeIssue {

    public static void main(String[] args) {
        
        Display display = new Display();
        Shell shell  = new Shell(display);
        shell.setSize(550, 250);
        shell.setText("A Combo Example");
        
        final Combo combo = new Combo(shell, SWT.READ_ONLY);
        combo.setBounds(100, 100, 150, 65);
        String items[] = { "First item selected by user", 
                "Second item selected by user", 
                "Third item selected by user"};
        combo.setItems(items);
        
        shell.open();
        while (!shell.isDisposed()) {
          if (!display.readAndDispatch())
            display.sleep();
        }
        display.dispose();
    }
}
Comment 1 Eric Williams CLA 2018-09-18 10:21:53 EDT

*** This bug has been marked as a duplicate of bug 500703 ***