Adding button to ListSelectionDialog [message #466331] |
Wed, 18 April 2007 00:53 |
Eclipse User |
|
|
|
Originally posted by: jweeks.neuraldk.org
Hello,
I fear this is a trivial task, but I'm new to jface and Eclipse plugins and
I'm unable to add a new button to a ListSelectionDialog.
I'd like to subclass a ListSelectionDialog and add one extra button which
will pop up a new dialog and allow me to add new items to the list.
Ideally, that button would be next to the "Select All" and "Deselect All"
buttons, but I'm really not picky about location, I'm more concerned with
understanding the process involved in adding this new button and getting it
to interact with the existing dialog as described.
I've seen a bunch of tutorials about creating new dialogs, but I haven't
found one yet that seems to describe how to do what I need. Could someone
please point me in the right direction?
Thanks,
Jeff
|
|
|
Re: Adding button to ListSelectionDialog [message #466568 is a reply to message #466331] |
Fri, 20 April 2007 23:46 |
Eclipse User |
|
|
|
Originally posted by: jweeks.neuraldk.org
After looking into the source code for the ListSelectionDialog I discovered
that, I believe, it's not possible to extend this dialog. The method
addSelectionButtons() creates the Composite and Button's, which I would
have liked to change, but the method cannot be overriden (private) and the
Composite is an inacessible local variable.
As such, my solution has been to, effectively, copy the ListSelectionDialog
source code, and tailor it to my own needs.
--Jeff
Jeff Weeks [ neuraldk ] wrote:
> Hello,
>
> I fear this is a trivial task, but I'm new to jface and Eclipse plugins
> and I'm unable to add a new button to a ListSelectionDialog.
>
> I'd like to subclass a ListSelectionDialog and add one extra button which
> will pop up a new dialog and allow me to add new items to the list.
> Ideally, that button would be next to the "Select All" and "Deselect All"
> buttons, but I'm really not picky about location, I'm more concerned with
> understanding the process involved in adding this new button and getting
> it to interact with the existing dialog as described.
>
> I've seen a bunch of tutorials about creating new dialogs, but I haven't
> found one yet that seems to describe how to do what I need. Could someone
> please point me in the right direction?
>
> Thanks,
> Jeff
|
|
|
|
Powered by
FUDForum. Page generated in 0.02987 seconds