Bug 4788 - Feature request: styled tree items (1GIGJK4)
Summary: Feature request: styled tree items (1GIGJK4)
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 2.0   Edit
Hardware: All All
: P4 normal (vote)
Target Milestone: ---   Edit
Assignee: Steve Northover CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-10-11 14:23 EDT by Joe Szurszewski CLA
Modified: 2002-05-16 10:08 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joe Szurszewski CLA 2001-10-11 14:23:02 EDT
JGS (8/14/01 11:48:04 AM)
	We need a way to style individual TreeItems, by setting font styles and/or colors.
	Right now, all items in a tree share the same font and color properties.  There
	are workarounds, but they are complex and involve setting TreeEditors.

KH (9/19/2001 9:49:53 AM)
	Moving to SWT

SN (10/3/01 6:23:19 PM)
	Could this be implemented as a hint on platforms whose native tree doles not
	support this capability?
Comment 1 Joe Szurszewski CLA 2001-11-07 14:57:05 EST
Somehow this wound up in my bucket.  Moving back to SWT, and assigning to Steve.
Comment 2 Mike Wilson CLA 2001-12-10 14:26:43 EST
It was put in your bucket, so you could answer the question. Restated it 
is: "Would you be willing to accept this feature, even if it was available on 
some platforms and not others?"
Comment 3 Joe Szurszewski CLA 2001-12-10 15:10:36 EST
Oh sorry, I didn't see it as a question for me.  The answer is yes, I think.  
On platforms that didn't support the styling, would there be any way to detect 
TreeItems that were supposed to have been styled differently, so that we could 
implement workarounds for them?  Is this what Steve's comment about a hint 
means?
Comment 4 Mike Wilson CLA 2001-12-10 16:49:58 EST
It depends. Hints are taken to be "just" appearance issues, so there may or 
may not be feedback on their availability. For things which are set as style 
bits, if the style isn't available, getting the style after the widget is 
created will show the bits as unset.

Can you describe how you intend to use this feature? If you are going to 
provide a workaround on some platforms, does it make sense to just do this 
everywhere?

Please give PR ownership back to me after you make your comments.
Comment 5 Joe Szurszewski CLA 2001-12-10 17:22:32 EST
We've had two situations where being able to style individual tree items would 
have been useful:
(1) Setting the foreground text color for stack frames in the debug tree to 
some gray value when stepping.  For now, we only set a different icon on the 
stack frame TreeItems.  I experimented with setting TreeEditors, etc., but this 
was clumsy and problematic.
(2) Setting a bold font on variables in the Variables view that have 
changed 'recently' (since last step or suspend).

I was interpreting the question about platform support for this as an open-
ended thing, i.e., some platforms in the future *may* not support this . . .
If we know for sure that there are platforms we intend to support that DO NOT 
support this feature (e.g., Windows, Linux), then I agree that a mix of native 
support and workarounds makes no sense.  Otherwise, this is a useful enough 
feature that I'd vote to implement it and take a chance on future platforms.  
Comment 6 Mike Wilson CLA 2001-12-11 09:02:08 EST
Ok. I understand the situation. I'm not sure when/if we'll get to this, but 
it's on the list.
Comment 7 Steve Northover CLA 2002-05-15 21:29:38 EDT
Color has been implemented.  Joe, can I close this PR?  (ie. not implement font)
Comment 8 Joe Szurszewski CLA 2002-05-16 10:03:50 EDT
Yes, close it.  Glad to have the color ability.  Thanks.
Comment 9 Steve Northover CLA 2002-05-16 10:08:37 EDT
Closing.  Thanks Joe.