Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » CTabFolder and TabFolder
CTabFolder and TabFolder [message #467504] Wed, 01 February 2006 08:10 Go to next message
Ihor Strutynskyj is currently offline Ihor StrutynskyjFriend
Messages: 9
Registered: July 2009
Junior Member
I have found when using Windows XP theme with Eclipse the
TabFolder/TabItem use a nice highlighting scheme as Windows XP does (see
second page in New Java Project wizard). But in our application, which
is also running on Windows XP theme, we must use CTabFolder/CTabItem (as
a container for MultiPageEditorPart) and we don't get these nice tabs
highlighting. Can anybody shed some light onto this or hint how to get
CtabFolder to look like TabFolder?

TIA,
Ihor
Re: CTabFolder and TabFolder [message #467598 is a reply to message #467504] Wed, 01 February 2006 17:01 Go to previous messageGo to next message
Adam Kumpf is currently offline Adam KumpfFriend
Messages: 14
Registered: July 2009
Junior Member
Ihor Strutynskyj wrote:

> I have found when using Windows XP theme with Eclipse the
> TabFolder/TabItem use a nice highlighting scheme as Windows XP does (see
> second page in New Java Project wizard). But in our application, which
> is also running on Windows XP theme, we must use CTabFolder/CTabItem (as
> a container for MultiPageEditorPart) and we don't get these nice tabs
> highlighting. Can anybody shed some light onto this or hint how to get
> CtabFolder to look like TabFolder?

> TIA,
> Ihor

Check out this page. It's not in english, but the code is! :)

http://yoichiro.cocolog-nifty.com/eclipse/2004/10/ctabfolder .html


On it, you will find a code snippet for setting the colors of the
CTabFolder to match the system colors. Not sure if this is what you were
looking for, but it makes a very good looking CTabFolder that depends on
the OS colors.

//-----------------------------------
// System colored CTabFolder
//-----------------------------------

Display display = Display.getCurrent();

  Color titleForeColor =
    display.getS ystemColor(SWT.COLOR_TITLE_FOREGROUND);
  Color titleBackColor1 =
    display.getS ystemColor(SWT.COLOR_TITLE_BACKGROUND);
  Color titleBackColor2 =
    display.getS ystemColor(SWT.COLOR_TITLE_BACKGROUND_GRADIENT);

  tabFolder.setSelectionForeground(tit leForeColor);
  tabFolder.setSelectionBackground(
    new Color[] {titleBackColor1,
titleBackColor2},
    new int[] {100},
    true
  );
Re: CTabFolder and TabFolder [message #467604 is a reply to message #467598] Wed, 01 February 2006 19:07 Go to previous messageGo to next message
Stanley is currently offline StanleyFriend
Messages: 6
Registered: July 2009
Junior Member
Cool. It worked! This is something I was looking for for a while.

Thanks.

Sincerely,
Stan
"Adam Kumpf" <kumpf@mit.edu> wrote in message
news:8db04b21699d5a05ec0c75be8e21be1e$1@www.eclipse.org...
> Ihor Strutynskyj wrote:
>
>> I have found when using Windows XP theme with Eclipse the
>> TabFolder/TabItem use a nice highlighting scheme as Windows XP does (see
>> second page in New Java Project wizard). But in our application, which is
>> also running on Windows XP theme, we must use CTabFolder/CTabItem (as a
>> container for MultiPageEditorPart) and we don't get these nice tabs
>> highlighting. Can anybody shed some light onto this or hint how to get
>> CtabFolder to look like TabFolder?
>
>> TIA,
>> Ihor
>
> Check out this page. It's not in english, but the code is! :)
>
> http://yoichiro.cocolog-nifty.com/eclipse/2004/10/ctabfolder .html
>
>
> On it, you will find a code snippet for setting the colors of the
> CTabFolder to match the system colors. Not sure if this is what you were
> looking for, but it makes a very good looking CTabFolder that depends on
> the OS colors.
>
> //-----------------------------------
> // System colored CTabFolder
> //-----------------------------------
>
> Display display = Display.getCurrent();
>
> &#12288;&#12288;Color titleForeColor =
> &#12288;&#12288;&#12288;&#12288;display.getS ystemColor(SWT.COLOR_TITLE_FOREGROUND);
> &#12288;&#12288;Color titleBackColor1 =
> &#12288;&#12288;&#12288;&#12288;display.getS ystemColor(SWT.COLOR_TITLE_BACKGROUND);
> &#12288;&#12288;Color titleBackColor2 =
> &#12288;&#12288;&#12288;&#12288;display.getS ystemColor(SWT.COLOR_TITLE_BACKGROUND_GRADIENT);
>
> &#12288;&#12288;tabFolder.setSelectionForeground(tit leForeColor);
> &#12288;&#12288;tabFolder.setSelectionBackground(
> &#12288;&#12288;&#12288;&#12288;new Color[] {titleBackColor1,
> titleBackColor2},
> &#12288;&#12288;&#12288;&#12288;new int[] {100},
> &#12288;&#12288;&#12288;&#12288;true
> &#12288;&#12288;);
>
>
>
>
Re: CTabFolder and TabFolder [message #467609 is a reply to message #467604] Wed, 01 February 2006 20:45 Go to previous messageGo to next message
Ihor Strutynskyj is currently offline Ihor StrutynskyjFriend
Messages: 9
Registered: July 2009
Junior Member
This is not what I'm looking for. Windows XP theme has a thin golden
strip on the top of the active tab, and when you move your mouse cursor
over inactive tabs they will get this thin golder strip as well. SWT
TabFolder as a native peer supports Windows XP theme, but CTabFolder
(pure Java) does not.

This article will give you an idea of what I'm looking for.
http://www.javalobby.org/java/forums/t16488.html

which I think is not possible with current SWT.

Ihor

Stanley wrote:
> Cool. It worked! This is something I was looking for for a while.
>
> Thanks.
>
> Sincerely,
> Stan
> "Adam Kumpf" <kumpf@mit.edu> wrote in message
> news:8db04b21699d5a05ec0c75be8e21be1e$1@www.eclipse.org...
>
>>Ihor Strutynskyj wrote:
>>
>>
>>>I have found when using Windows XP theme with Eclipse the
>>>TabFolder/TabItem use a nice highlighting scheme as Windows XP does (see
>>>second page in New Java Project wizard). But in our application, which is
>>>also running on Windows XP theme, we must use CTabFolder/CTabItem (as a
>>>container for MultiPageEditorPart) and we don't get these nice tabs
>>>highlighting. Can anybody shed some light onto this or hint how to get
>>>CtabFolder to look like TabFolder?
>>
>>>TIA,
>>>Ihor
>>
>>Check out this page. It's not in english, but the code is! :)
>>
>> http://yoichiro.cocolog-nifty.com/eclipse/2004/10/ctabfolder .html
>>
>>
>>On it, you will find a code snippet for setting the colors of the
>>CTabFolder to match the system colors. Not sure if this is what you were
>>looking for, but it makes a very good looking CTabFolder that depends on
>>the OS colors.
>>
>>//-----------------------------------
>>// System colored CTabFolder
>>//-----------------------------------
>>
>>Display display = Display.getCurrent();
Re: CTabFolder and TabFolder [message #467772 is a reply to message #467609] Mon, 06 February 2006 15:30 Go to previous message
Veronika Irvine is currently offline Veronika IrvineFriend
Messages: 1272
Registered: July 2009
Senior Member
CTabFolder is not meant to be just like a native tabfolder with added
capabilities. CTabFolder is meant to be part of the "branding" of Eclipse
giving it a customized look.


"Ihor Strutynskyj" <eclipse-news@telus.net> wrote in message
news:drr6l7$s4g$1@utils.eclipse.org...
> This is not what I'm looking for. Windows XP theme has a thin golden strip
> on the top of the active tab, and when you move your mouse cursor over
> inactive tabs they will get this thin golder strip as well. SWT TabFolder
> as a native peer supports Windows XP theme, but CTabFolder (pure Java)
> does not.
>
> This article will give you an idea of what I'm looking for.
> http://www.javalobby.org/java/forums/t16488.html
>
> which I think is not possible with current SWT.
>
> Ihor
>
> Stanley wrote:
>> Cool. It worked! This is something I was looking for for a while.
>>
>> Thanks.
>>
>> Sincerely,
>> Stan
>> "Adam Kumpf" <kumpf@mit.edu> wrote in message
>> news:8db04b21699d5a05ec0c75be8e21be1e$1@www.eclipse.org...
>>
>>>Ihor Strutynskyj wrote:
>>>
>>>
>>>>I have found when using Windows XP theme with Eclipse the
>>>>TabFolder/TabItem use a nice highlighting scheme as Windows XP does (see
>>>>second page in New Java Project wizard). But in our application, which
>>>>is also running on Windows XP theme, we must use CTabFolder/CTabItem (as
>>>>a container for MultiPageEditorPart) and we don't get these nice tabs
>>>>highlighting. Can anybody shed some light onto this or hint how to get
>>>>CtabFolder to look like TabFolder?
>>>
>>>>TIA,
>>>>Ihor
>>>
>>>Check out this page. It's not in english, but the code is! :)
>>>
>>> http://yoichiro.cocolog-nifty.com/eclipse/2004/10/ctabfolder .html
>>>
>>>
>>>On it, you will find a code snippet for setting the colors of the
>>>CTabFolder to match the system colors. Not sure if this is what you were
>>>looking for, but it makes a very good looking CTabFolder that depends on
>>>the OS colors.
>>>
>>>//-----------------------------------
>>>// System colored CTabFolder
>>>//-----------------------------------
>>>
>>>Display display = Display.getCurrent();
Previous Topic:Hexagon
Next Topic:programmatically limiting scale drag
Goto Forum:
  


Current Time: Fri Apr 19 21:54:29 GMT 2024

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

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

Back to the top