Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Select all
Select all [message #459545] Wed, 10 August 2005 12:08 Go to next message
Eclipse UserFriend
Originally posted by: vducloux.cosmosbay-vectis.com

Hi I would like to have a select all button that selects all the element
of my table.

How can I do that ?,

thanks in advance

Victor
Re: Select all [message #459562 is a reply to message #459545] Wed, 10 August 2005 22:27 Go to previous messageGo to next message
Chris is currently offline ChrisFriend
Messages: 17
Registered: July 2009
Junior Member
Ducloux Victor wrote:

> Hi I would like to have a select all button that selects all the element
> of my table.

> How can I do that ?,

> thanks in advance

> Victor

One way could be:

selectAllButton.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent selectionEvent) {
table.setSelection(0, table.getItemCount());
table.setFocus();
}
});
Re: Select all [message #459564 is a reply to message #459562] Wed, 10 August 2005 22:45 Go to previous messageGo to next message
Chris is currently offline ChrisFriend
Messages: 17
Registered: July 2009
Junior Member
Chris wrote:

> One way could be:

> selectAllButton.addSelectionListener(new SelectionAdapter() {
> public void widgetSelected(SelectionEvent selectionEvent) {
> table.setSelection(0, table.getItemCount());
> table.setFocus();
> }
> });


Sorry, even neater way would be:

selectAllButton.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent selectionEvent) {
table.selectAll();
table.setFocus();
}
});
Re: Select all [message #459567 is a reply to message #459564] Thu, 11 August 2005 07:38 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: vducloux.cosmosbay-vectis.com

Thank you very much, it works great !!

all this "listener" stuff is getting more clear in my head !

thanks Victor

Chris wrote:
> Chris wrote:
>
>> One way could be:
>
>
>> selectAllButton.addSelectionListener(new SelectionAdapter() {
>> public void widgetSelected(SelectionEvent selectionEvent) {
>> table.setSelection(0, table.getItemCount());
>> table.setFocus();
>> }
>> });
>
>
>
> Sorry, even neater way would be:
>
> selectAllButton.addSelectionListener(new SelectionAdapter() {
> public void widgetSelected(SelectionEvent selectionEvent) {
> table.selectAll();
> table.setFocus();
> }
> });
>
Re: Select all [message #459598 is a reply to message #459567] Fri, 12 August 2005 04:26 Go to previous message
Chris is currently offline ChrisFriend
Messages: 17
Registered: July 2009
Junior Member
Ducloux Victor wrote:

> Thank you very much, it works great !!

> all this "listener" stuff is getting more clear in my head !

> thanks Victor


Excellent!
Previous Topic:Table with check
Next Topic:SWT_AWT bridge: Can I register Swing Events for SWT widgets?
Goto Forum:
  


Current Time: Thu Apr 25 16:58:56 GMT 2024

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

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

Back to the top