Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Can I associate a JFace's LabelProvider to swt.widgets.List control?
Can I associate a JFace's LabelProvider to swt.widgets.List control? [message #444498] Thu, 14 October 2004 00:41 Go to next message
Alex Le is currently offline Alex LeFriend
Messages: 649
Registered: July 2009
Senior Member
Hi,

I am looking to be able to put a tiny icon in front each of the items in
my swt.widgets.List control. Is this possible to do by associating a
JFace LabelProvider to the list?

I have posts and it seems not possible? Possible with swt.widgets.Table
control? Any sample code would be appreciated. Thanks.
Re: Can I associate a JFace's LabelProvider to swt.widgets.List control? [message #444502 is a reply to message #444498] Thu, 14 October 2004 12:52 Go to previous messageGo to next message
Veronika Irvine is currently offline Veronika IrvineFriend
Messages: 1272
Registered: July 2009
Senior Member
The List widget does not support images. You need to use a Table.

"AL" <unbonnevie@yahoo.com> wrote in message
news:ckkhj5$deu$1@eclipse.org...
> Hi,
>
> I am looking to be able to put a tiny icon in front each of the items in
> my swt.widgets.List control. Is this possible to do by associating a
> JFace LabelProvider to the list?
>
> I have posts and it seems not possible? Possible with swt.widgets.Table
> control? Any sample code would be appreciated. Thanks.
>
Check button selection state [message #444504 is a reply to message #444502] Thu, 14 October 2004 13:19 Go to previous messageGo to next message
Anthony Bennis is currently offline Anthony BennisFriend
Messages: 17
Registered: July 2009
Junior Member
Hi,

I'm attempting to set a button with style SWT.CHECK to be "half
selected". Is this feature implemented in SWT?

An example of "half selected" appears in MS Windows when you select
multiple properties and look and the read only check box. It's check
mark and backgound are lightly grayed if some files are read only and
others are not.

Having failed to find a method to achieve this, I attempted to changed
the colour of the check myself with setForeground(Color color); but this
has no effect on the check mark.

Any help appreciated.
Anthony Bennis.
Re: Check button selection state [message #444560 is a reply to message #444504] Thu, 14 October 2004 17:41 Go to previous messageGo to next message
Alex Le is currently offline Alex LeFriend
Messages: 649
Registered: July 2009
Senior Member
Hi,

Are you talking about enabling and disabling a SWT control? If so, you
can call the method setEnabled(boolean flag). If 'flag' is false, then
the control will be gray out (if it's a label) or not
selectable/editable if it's something editable.

Good luck!

Anthony Bennis wrote:

> Hi,
>
> I'm attempting to set a button with style SWT.CHECK to be "half
> selected". Is this feature implemented in SWT?
>
> An example of "half selected" appears in MS Windows when you select
> multiple properties and look and the read only check box. It's check
> mark and backgound are lightly grayed if some files are read only and
> others are not.
>
> Having failed to find a method to achieve this, I attempted to changed
> the colour of the check myself with setForeground(Color color); but this
> has no effect on the check mark.
>
> Any help appreciated.
> Anthony Bennis.
>
>
>
>
Re: Check button selection state [message #444576 is a reply to message #444560] Fri, 15 October 2004 10:47 Go to previous messageGo to next message
Anthony Bennis is currently offline Anthony BennisFriend
Messages: 17
Registered: July 2009
Junior Member
Thanks, but I'm referring the the "3rd selection state" of a check box.
I think windows uses the BST_INDETERMINATE flag when creating a check
button of that state. I read in the forums that it's not supported in
SWT, but having looked at the source code of Button.java, it looks like
it would be trivial enough to implement. Although, having said that, I
attempted to add the extra selection flag, but it didn't work.

I don't think there's any easy solution to this problem, so I'm going to
create a basic custom widget, that has three selection states.

Thanks for the repsonse though.



AL wrote:
> Hi,
>
> Are you talking about enabling and disabling a SWT control? If so, you
> can call the method setEnabled(boolean flag). If 'flag' is false, then
> the control will be gray out (if it's a label) or not
> selectable/editable if it's something editable.
>
> Good luck!
>
> Anthony Bennis wrote:
>
>> Hi,
>>
>> I'm attempting to set a button with style SWT.CHECK to be "half
>> selected". Is this feature implemented in SWT?
>>
>> An example of "half selected" appears in MS Windows when you select
>> multiple properties and look and the read only check box. It's check
>> mark and backgound are lightly grayed if some files are read only and
>> others are not.
>>
>> Having failed to find a method to achieve this, I attempted to changed
>> the colour of the check myself with setForeground(Color color); but this
>> has no effect on the check mark.
>>
>> Any help appreciated.
>> Anthony Bennis.
>>
>>
>>
>>
>
Re: Check button selection state [message #444585 is a reply to message #444576] Fri, 15 October 2004 14:21 Go to previous message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
https://bugs.eclipse.org/bugs/show_bug.cgi?id=22261

"Anthony Bennis" <anthonybennis@oceanfree.net> wrote in message
news:cko9ib$q1i$1@eclipse.org...
> Thanks, but I'm referring the the "3rd selection state" of a check box.
> I think windows uses the BST_INDETERMINATE flag when creating a check
> button of that state. I read in the forums that it's not supported in
> SWT, but having looked at the source code of Button.java, it looks like
> it would be trivial enough to implement. Although, having said that, I
> attempted to add the extra selection flag, but it didn't work.
>
> I don't think there's any easy solution to this problem, so I'm going to
> create a basic custom widget, that has three selection states.
>
> Thanks for the repsonse though.
>
>
>
> AL wrote:
> > Hi,
> >
> > Are you talking about enabling and disabling a SWT control? If so, you
> > can call the method setEnabled(boolean flag). If 'flag' is false, then
> > the control will be gray out (if it's a label) or not
> > selectable/editable if it's something editable.
> >
> > Good luck!
> >
> > Anthony Bennis wrote:
> >
> >> Hi,
> >>
> >> I'm attempting to set a button with style SWT.CHECK to be "half
> >> selected". Is this feature implemented in SWT?
> >>
> >> An example of "half selected" appears in MS Windows when you select
> >> multiple properties and look and the read only check box. It's check
> >> mark and backgound are lightly grayed if some files are read only and
> >> others are not.
> >>
> >> Having failed to find a method to achieve this, I attempted to changed
> >> the colour of the check myself with setForeground(Color color); but
this
> >> has no effect on the check mark.
> >>
> >> Any help appreciated.
> >> Anthony Bennis.
> >>
> >>
> >>
> >>
> >
Previous Topic:jface TextEditor folding support
Next Topic:Wrap Text on Button
Goto Forum:
  


Current Time: Thu Apr 25 15:12:01 GMT 2024

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

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

Back to the top