Forums Register Login

SWT viewer.getSelection

+Pie Number of slices to send: Send
I am new to SWT. In Swing I could find the count of things in a list or tree.
Now, I have a TreeViewer that can be empty. I need a way to make sure there is something to select before I call viewer.getSelection()

Thanks for any hints....
+Pie Number of slices to send: Send
OK. never mind. I can get the number of items selected with viewer.getSelection(). If there are no items, the length of the array this returns will be zero.
I just had the craziest dream. This tiny ad was in it.
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 767 times.
Similar Threads
Is SWT worth learning *instead of* Swing?
Is "The Definitive Guide to SWT and JFACE" just a guide?
Clearing old widgets and creating the same again on a button click
Event on a Table row- ( S W T ).
Focus in SWT
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 01:55:46.