Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [pde-ui-dev] How to get multiple checkbox columns in CheckboxTableViewer

Hi Chethan,

Check out the CheckboxCellEditor.

The tableviewer you're using should have a setCellEditors,
setCellModifier, and setColumnProperties.

Here's my let's-hope-this-works strategy for the above 3 methods :)

Create an array of CellEditors for your table viewer.  For the
particular column you want to have checkboxes, declare that particular
index of your array to be a checkbox cell editor.  Then inherit a new
ICellModifier for your table viewer and fill in the required methods
(note that you identify what column you're modifying via the String
property parameter in each method).  Next, assign a String property to
each column so you can identify it with the cell modifier.

Dig into the TableViewer and CellEditor APIs for more insight.

Last -- but never least -- this kind of question really isn't for the
PDE UI DEV mailing list since table viewers aren't PDE UI and DEV
mailing lists are geared towards developer discussions on design &
implementation rather than how-to-use :-)  The place best suited for
this question is the newsgroups:
http://eclipse.org/newsgroups/index.html  (Try the platform or SWT
newsgroups)


Hope that helps!

Yours,
Cherie.

On 9/4/05, Chethan Rn <Chethan.Rn@xxxxxxxxxx> wrote:
>             
>   
> 
> Hi all,  
> 
>             How do I get columns with checkbox items. I would be using to select the values and do some processing. I just checked API of CheckBoxTableViewer , but it by default gives checkbox only to one column and other columns does not have checkbox.  I am using this as filtering and the tableviewer is readonly.  
> 
>    
> 
> I tried creating  Table with SWT.CHECK which gives checkbox only for the first column and checking it would mean whole row is selected. But I need something like column value selection. I am very new to SWT and JFACE could anybody throw some light with little detailed API (Approach). My table viewer should look something like this,  
> 
>    
> 
> I should be able to select data values per column and not rows  
> 
>    
> 
>    
> 
>   
> 
>    
> 
>    
> 
> Thanks in advance  
> 
> Chethan.      
> 
> _______________
>  Siebel
>  IT'S ALL ABOUT THE CUSTOMER
>  Visit www.siebel.com
>  
>  This e-mail message is for the sole use of the intended recipient(s) and contains confidential and/or privileged information belonging to Siebel Systems, Inc. or its customers or partners. Any unauthorized review, use, copying, disclosure or distribution of this message is strictly prohibited. If you are not an intended recipient of this message, please contact the sender by reply e-mail and destroy all soft and hard copies of the message and any attachments. Thank you for your cooperation.
>      
> _______________________________________________
> pde-ui-dev mailing list
> pde-ui-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/pde-ui-dev
> 
> 
>


Back to the top