java - Set the checkbox of a CheckboxTableViewer when the row is clicked -


I am very new to SWT really started to work on today's table of a type I Chekboksteblwuvr I what I want to be able to, even when the user is a listener selects the line (ie also click anywhere on the line) I Czech box should be the Czech (tick) I currently have CheckboxTableViewer at:

  diagnosesTableViewer.addCheckStateListener (new IKCestat Aistnr () {@Override public void Chekstet Chenjed (Chekstet Chenjedivent event) {changed location nomination naming = (naming) event KgetElement (); if (EventkgetChecked ()) {SelectedNomenclatureskadd (changing location name);} Other {selectedNomenclatures.remove (Changing Location Nominations)}}}});   

I am able to choose a row by checking the checkbox. But I want to select the check box, when the user selects the row on any column by clicking anywhere on that row (not just checkbox).

I think that argument can AddSelectionChangedListener to AddSelectionChangedListener add but I'm not sure how to go about it any help me with this somewhere?

Use this code: Add a selection listener to the table. ctv is an example of your checkbox tagviewer .

In addition to this, I assume that the checkbox tagviewer only allows a single selection.

  ctv.getTable (). AddSelectionListener (new Cynadhunik () {@Override public void widget selected (SelectionEvent e) {int df = ctv.getTable (). GetSelectionIndex (); ctv.setChecked (ctv.getElementAt (df) ,! Ctv.getChecked (ctv.getElementAt (Df)));}});    

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -