Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JFace » selection in CheckboxTableViewer doesnt work in win7/64
selection in CheckboxTableViewer doesnt work in win7/64 [message #742144] Thu, 20 October 2011 04:09 Go to next message
hage Mising name is currently offline hage Mising name
Messages: 67
Registered: September 2011
Member
Hi there,

i try to use an org.eclipse.jface.viewers.CheckboxTableViewer, as a component of a org.eclipse.jface.wizard.WizardPage. I created it this way:

    public void createControl(Composite parent) {
        composite = new Composite(parent, SWT.NULL);
        final GridLayout gridLayout = new GridLayout();
        gridLayout.numColumns = 2;
        composite.setLayout(gridLayout);
        setControl(composite);

        /* CheckboxTableViewer */
        viewer = CheckboxTableViewer.newCheckList(composite, SWT.BORDER);
        final Table table = viewer.getTable();
        GridData data1 = new GridData();
        data1.grabExcessHorizontalSpace = true;
        data1.grabExcessVerticalSpace = true;
        data1.horizontalSpan = 2;
        data1.horizontalAlignment = SWT.FILL;
        data1.verticalAlignment = SWT.FILL;
        table.setLayoutData(data1);
        table.setHeaderVisible(true);
        table.setLinesVisible(true);

        checkboxColumn = new TableColumn(table, SWT.LEFT);
        ...

the content of the viewer is inserted by a contentprovider, so it's dynamic. Everything works fine on gnome. While testing this on windows 7 (64 and 32 bit also), i am not able to select any entries of that view. Mouseclicks just seems to have no impact on the view. Anyone who can explain this behaviour to me?

thx in advance,

hage
Re: selection in CheckboxTableViewer doesnt work in win7/64 [message #742340 is a reply to message #742144] Thu, 20 October 2011 08:08 Go to previous messageGo to next message
hage Mising name is currently offline hage Mising name
Messages: 67
Registered: September 2011
Member
just for additional information, i added a doubleclicklistener and a selectionchangedlistener to the view, on gnome, both of them fires (clicking the table items), on windows they dont.
Re: selection in CheckboxTableViewer doesnt work in win7/64 [message #743272 is a reply to message #742144] Fri, 21 October 2011 05:45 Go to previous message
hage Mising name is currently offline hage Mising name
Messages: 67
Registered: September 2011
Member
ok, got it.

you have to add the style constant:

SWT.FULL_SELECTION


to the viewers constructor. Then it will work with windows as well.
Previous Topic:[Databinding/EMF] Double entries in TreeViewer ->MapChangeEvent result set incorrect.
Next Topic:Smooth updating treeviewer with DeferredTreeContentManager
Goto Forum:
  


Current Time: Thu Aug 28 03:31:13 EDT 2014

Powered by FUDForum. Page generated in 0.05303 seconds