|
Re: CTabFolder and TabFolder [message #467598 is a reply to message #467504] |
Wed, 01 February 2006 17:01 |
Adam Kumpf 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 |
Stanley 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();
>
>   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 #467609 is a reply to message #467604] |
Wed, 01 February 2006 20:45 |
Ihor Strutynskyj 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 |
Veronika Irvine 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();
|
|
|
Powered by
FUDForum. Page generated in 0.03499 seconds