Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Changing bgcolor in Section title bars...
Changing bgcolor in Section title bars... [message #328573] Tue, 27 May 2008 18:44 Go to next message
Jason Woods is currently offline Jason WoodsFriend
Messages: 29
Registered: July 2009
Junior Member
I'm trying to change the background of a Section's title bar AFTER the
section has been created and painted. I've tried using
setTitleBarBackground(Color) alone and in combination with any number of
other methods I thought might trigger a repaint but was never able to get
the section to repaint itself automatically. The color was never changed
until I interacted with the Section (in my case expand/collapse the
section).

Is there some special mechanism in the forms API I need to call after
changing a color to force a repaint to happen automatically? If so, what
is it?
Re: Changing bgcolor in Section title bars... [message #328660 is a reply to message #328573] Fri, 30 May 2008 15:29 Go to previous messageGo to next message
Jason Woods is currently offline Jason WoodsFriend
Messages: 29
Registered: July 2009
Junior Member
Anyone?
Re: Changing bgcolor in Section title bars... [message #328661 is a reply to message #328573] Fri, 30 May 2008 15:44 Go to previous messageGo to next message
Wayne Beaton is currently offline Wayne BeatonFriend
Messages: 554
Registered: December 2017
Senior Member
Did you try asking the section to redraw()?

(not sure if this will work, it's just an idea that I'm too lazy to try
for myself).

Wayne

On Tue, 2008-05-27 at 18:44 +0000, Jason Woods wrote:
> I'm trying to change the background of a Section's title bar AFTER the
> section has been created and painted. I've tried using
> setTitleBarBackground(Color) alone and in combination with any number of
> other methods I thought might trigger a repaint but was never able to get
> the section to repaint itself automatically. The color was never changed
> until I interacted with the Section (in my case expand/collapse the
> section).
>
> Is there some special mechanism in the forms API I need to call after
> changing a color to force a repaint to happen automatically? If so, what
> is it?
>
Re: Changing bgcolor in Section title bars... [message #328662 is a reply to message #328661] Fri, 30 May 2008 16:43 Go to previous messageGo to next message
Jason Woods is currently offline Jason WoodsFriend
Messages: 29
Registered: July 2009
Junior Member
Yep, tried that...
Re: Changing bgcolor in Section title bars... [message #328665 is a reply to message #328662] Fri, 30 May 2008 17:33 Go to previous message
Wayne Beaton is currently offline Wayne BeatonFriend
Messages: 554
Registered: December 2017
Senior Member
You said that it updates when you interact with the Section (i.e.
expand/collapse). Try putting a breakpoint on the setExpanded() method
in ExpandableComposite to see what happens when you expand/collapse.

I suspect that one of the layout() or reflow() methods might help.

(again, I've only just quickly glanced at the code, as I'm too lazy to
actually try it myself)

Wayne

On Fri, 2008-05-30 at 16:43 +0000, Jason Woods wrote:
> Yep, tried that...
>
Previous Topic:Expressions definition iterate/or condition
Next Topic:Binding keys to command sequences?
Goto Forum:
  


Current Time: Fri Nov 08 22:08:04 GMT 2024

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

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

Back to the top