Skip to main content



      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
Eclipse UserFriend
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
Eclipse UserFriend
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
Eclipse UserFriend
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:Menumanager setVisible doesn't work as expected
Next Topic:Rebroadcast selection after TableViewer row changed
Goto Forum:
  


Current Time: Thu Jul 24 16:55:01 EDT 2025

Powered by FUDForum. Page generated in 1.15028 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top