Change titlecolor from NSWindow

  • hello

    i try to change the the title color from NSWindow.

    i have following code, but i don't know how can i change the color
    attribute from this objects...

    NSEnumerator *windowViewsEnum = [[[[self contentView] superview]
    subviews] objectEnumerator];
    id viewObject;
    while (viewObject = [windowViewsEnum nextObject])
    {
      NSLog(@"viewObject: %@", [viewObject className]);
      if ([[viewObject className] isEqualToString: @"_NSThemeWidget"])
      {
      [[viewObject cell] setColor: [NSColor redColor]];
      }
    }

    what can i try?

    best regards and thank you

    philippe regenass
  • On Oct 2, 2006, at 3:33 PM, Philippe Heinrich Regenass wrote:

    > i try to change the the title color from NSWindow.
    >
    > i have following code, but i don't know how can i change the color
    > attribute from this objects...
    >
    > NSEnumerator *windowViewsEnum = [[[[self contentView] superview]
    > subviews] objectEnumerator];
    > id viewObject;
    > while (viewObject = [windowViewsEnum nextObject])
    > {
    > NSLog(@"viewObject: %@", [viewObject className]);
    > if ([[viewObject className] isEqualToString: @"_NSThemeWidget"])
    > {
    > [[viewObject cell] setColor: [NSColor redColor]];
    > }
    > }
    >
    > what can i try?

    Why do you need to do this?

    ___________________________________________________________
    Ricky A. Sharp        mailto:<rsharp...>
    Instant Interactive(tm)  http://www.instantinteractive.com
  • hi

    i have a toolbar with black background. black on black i'ts not verry
    good readable ;-)

    Am 02.10.2006 um 22:45 schrieb Ricky Sharp:

    >
    > On Oct 2, 2006, at 3:33 PM, Philippe Heinrich Regenass wrote:
    >
    >> i try to change the the title color from NSWindow.
    >>
    >> i have following code, but i don't know how can i change the color
    >> attribute from this objects...
    >>
    >> NSEnumerator *windowViewsEnum = [[[[self contentView] superview]
    >> subviews] objectEnumerator];
    >> id viewObject;
    >> while (viewObject = [windowViewsEnum nextObject])
    >> {
    >> NSLog(@"viewObject: %@", [viewObject className]);
    >> if ([[viewObject className] isEqualToString: @"_NSThemeWidget"])
    >> {
    >> [[viewObject cell] setColor: [NSColor redColor]];
    >> }
    >> }
    >>
    >> what can i try?
    >
    > Why do you need to do this?
    >
    > ___________________________________________________________
    > Ricky A. Sharp        mailto:<rsharp...>
    > Instant Interactive(tm)  http://www.instantinteractive.com
    >
  • Err, maybe you shouldn't use a black background on the toolbar :)

    On Oct 2, 2006, at 1:57 PM, Philippe Heinrich Regenass wrote:

    > hi
    >
    > i have a toolbar with black background. black on black i'ts not
    > verry good readable ;-)
    >
    >
    > Am 02.10.2006 um 22:45 schrieb Ricky Sharp:
    >
    >>
    >> On Oct 2, 2006, at 3:33 PM, Philippe Heinrich Regenass wrote:
    >>
    >>> i try to change the the title color from NSWindow.
    >>>
    >>> i have following code, but i don't know how can i change the
    >>> color attribute from this objects...
    >>>
    >>> NSEnumerator *windowViewsEnum = [[[[self contentView] superview]
    >>> subviews] objectEnumerator];
    >>> id viewObject;
    >>> while (viewObject = [windowViewsEnum nextObject])
    >>> {
    >>> NSLog(@"viewObject: %@", [viewObject className]);
    >>> if ([[viewObject className] isEqualToString: @"_NSThemeWidget"])
    >>> {
    >>> [[viewObject cell] setColor: [NSColor redColor]];
    >>> }
    >>> }
    >>>
    >>> what can i try?
    >>
    >> Why do you need to do this?
    >>
    >> ___________________________________________________________
    >> Ricky A. Sharp        mailto:<rsharp...>
    >> Instant Interactive(tm)  http://www.instantinteractive.com
    >>
    >
    > _______________________________________________
    > Do not post admin requests to the list. They will be ignored.
    > Cocoa-dev mailing list      (<Cocoa-dev...>)
    > Help/Unsubscribe/Update your Subscription:
    > http://lists.apple.com/mailman/options/cocoa-dev/jstiles%
    > 40blizzard.com
    >
    > This email sent to <jstiles...>
  • Sounds like good advice to me!

    On 2 Oct 2006, at 22:09, John Stiles wrote:

    > Err, maybe you shouldn't use a black background on the toolbar :)
    >
    > On Oct 2, 2006, at 1:57 PM, Philippe Heinrich Regenass wrote:
    >
    >> hi
    >>
    >> i have a toolbar with black background. black on black i'ts not
    >> verry good readable ;-)
    >>
    >>
    >> Am 02.10.2006 um 22:45 schrieb Ricky Sharp:
    >>
    >>>
    >>> On Oct 2, 2006, at 3:33 PM, Philippe Heinrich Regenass wrote:
    >>>
    >>>> i try to change the the title color from NSWindow.
    >>>>
    >>>> i have following code, but i don't know how can i change the
    >>>> color attribute from this objects...
    >>>>
    >>>> NSEnumerator *windowViewsEnum = [[[[self contentView]
    >>>> superview] subviews] objectEnumerator];
    >>>> id viewObject;
    >>>> while (viewObject = [windowViewsEnum nextObject])
    >>>> {
    >>>> NSLog(@"viewObject: %@", [viewObject className]);
    >>>> if ([[viewObject className] isEqualToString: @"_NSThemeWidget"])
    >>>> {
    >>>> [[viewObject cell] setColor: [NSColor redColor]];
    >>>> }
    >>>> }
    >>>>
    >>>> what can i try?
    >>>
    >>> Why do you need to do this?
    >>>
    >>> ___________________________________________________________
    >>> Ricky A. Sharp        mailto:<rsharp...>
    >>> Instant Interactive(tm)  http://www.instantinteractive.com
    >>>
    >>
    >> _______________________________________________
    >> Do not post admin requests to the list. They will be ignored.
    >> Cocoa-dev mailing list      (<Cocoa-dev...>)
    >> Help/Unsubscribe/Update your Subscription:
    >> http://lists.apple.com/mailman/options/cocoa-dev/jstiles%
    >> 40blizzard.com
    >>
    >> This email sent to <jstiles...>
    >
    > _______________________________________________
    > Do not post admin requests to the list. They will be ignored.
    > Cocoa-dev mailing list      (<Cocoa-dev...>)
    > Help/Unsubscribe/Update your Subscription:
    > http://lists.apple.com/mailman/options/cocoa-dev/mike.abdullah%
    > 40gmail.com
    >
    > This email sent to <mike.abdullah...>
  • okey....but i want this look for my first version... i think,when
    leopard is released, i will change both looks to one "new" leopard
    look... ;-)

    but now, i want my black look ;-)

    Am 02.10.2006 um 23:24 schrieb John Stiles:

    > History has shown that third party apps which do not conform to the
    > HIG look stupid after a few years.
    > This applies to Apple programs as well.
    >
    >
    > On Oct 2, 2006, at 2:20 PM, Philippe Heinrich Regenass wrote:
    >
    >> but i want! ;-) pleace, i have too looks, the classic and the
    >> "modern" black look. i'ts a verry nice look the black but the
    >> title ;-)
    >>
    >> ps: i'ts garageband, itunes... conformable to the Apple Human
    >> Interface Guidelines? ;-)
    >>
    >>
    >>
    >>
    >>
    >> Am 02.10.2006 um 23:09 schrieb John Stiles:
    >>
    >>> Err, maybe you shouldn't use a black background on the toolbar :)
    >>>
    >>> On Oct 2, 2006, at 1:57 PM, Philippe Heinrich Regenass wrote:
    >>>
    >>>> hi
    >>>>
    >>>> i have a toolbar with black background. black on black i'ts not
    >>>> verry good readable ;-)
    >>>>
    >>>>
    >>>> Am 02.10.2006 um 22:45 schrieb Ricky Sharp:
    >>>>
    >>>>>
    >>>>> On Oct 2, 2006, at 3:33 PM, Philippe Heinrich Regenass wrote:
    >>>>>
    >>>>>> i try to change the the title color from NSWindow.
    >>>>>>
    >>>>>> i have following code, but i don't know how can i change the
    >>>>>> color attribute from this objects...
    >>>>>>
    >>>>>> NSEnumerator *windowViewsEnum = [[[[self contentView]
    >>>>>> superview] subviews] objectEnumerator];
    >>>>>> id viewObject;
    >>>>>> while (viewObject = [windowViewsEnum nextObject])
    >>>>>> {
    >>>>>> NSLog(@"viewObject: %@", [viewObject className]);
    >>>>>> if ([[viewObject className] isEqualToString:
    >>>>>> @"_NSThemeWidget"])
    >>>>>> {
    >>>>>> [[viewObject cell] setColor: [NSColor redColor]];
    >>>>>> }
    >>>>>> }
    >>>>>>
    >>>>>> what can i try?
    >>>>>
    >>>>> Why do you need to do this?
    >>>>>
    >>>>> ___________________________________________________________
    >>>>> Ricky A. Sharp        mailto:<rsharp...>
    >>>>> Instant Interactive(tm)  http://www.instantinteractive.com
    >>>>>
    >>>>
    >>>> _______________________________________________
    >>>> Do not post admin requests to the list. They will be ignored.
    >>>> Cocoa-dev mailing list      (<Cocoa-dev...>)
    >>>> Help/Unsubscribe/Update your Subscription:
    >>>> http://lists.apple.com/mailman/options/cocoa-dev/jstiles%
    >>>> 40blizzard.com
    >>>>
    >>>> This email sent to <jstiles...>
    >>>
    >>
    >
  • But just in case that a black background on the toolbar would be a
    good idea, how would one do to change the title color?

    On 2 okt 2006, at 23.09, John Stiles wrote:

    > Err, maybe you shouldn't use a black background on the toolbar :)
    >
    > On Oct 2, 2006, at 1:57 PM, Philippe Heinrich Regenass wrote:
    >
    >> hi
    >>
    >> i have a toolbar with black background. black on black i'ts not
    >> verry good readable ;-)
    >>
    >>
    >> Am 02.10.2006 um 22:45 schrieb Ricky Sharp:
    >>
    >>>
    >>> On Oct 2, 2006, at 3:33 PM, Philippe Heinrich Regenass wrote:
    >>>
    >>>> i try to change the the title color from NSWindow.
    >>>>
    >>>> i have following code, but i don't know how can i change the
    >>>> color attribute from this objects...
    >>>>
    >>>> NSEnumerator *windowViewsEnum = [[[[self contentView]
    >>>> superview] subviews] objectEnumerator];
    >>>> id viewObject;
    >>>> while (viewObject = [windowViewsEnum nextObject])
    >>>> {
    >>>> NSLog(@"viewObject: %@", [viewObject className]);
    >>>> if ([[viewObject className] isEqualToString: @"_NSThemeWidget"])
    >>>> {
    >>>> [[viewObject cell] setColor: [NSColor redColor]];
    >>>> }
    >>>> }
    >>>>
    >>>> what can i try?
    >>>
    >>> Why do you need to do this?
    >>>
    >>> ___________________________________________________________
    >>> Ricky A. Sharp        mailto:<rsharp...>
    >>> Instant Interactive(tm)  http://www.instantinteractive.com
    >>>
    >>
    >> _______________________________________________
    >> Do not post admin requests to the list. They will be ignored.
    >> Cocoa-dev mailing list      (<Cocoa-dev...>)
    >> Help/Unsubscribe/Update your Subscription:
    >> http://lists.apple.com/mailman/options/cocoa-dev/jstiles%
    >> 40blizzard.com
    >>
    >> This email sent to <jstiles...>
    >
    > _______________________________________________
    > Do not post admin requests to the list. They will be ignored.
    > Cocoa-dev mailing list      (<Cocoa-dev...>)
    > Help/Unsubscribe/Update your Subscription:
    > http://lists.apple.com/mailman/options/cocoa-dev/<karlsson...>
    >
    > This email sent to <karlsson...>
  • On 3 okt 2006, at 16.48, Stephen Deken wrote:

    >> But just in case that a black background on the toolbar would be a
    >> good idea, how would one do to change the title color?
    >
    > I'm not clear on what's being asked here, really.  Are we talking
    > about the title bar of the window (e.g., with the close buttons and
    > whatnot), or are we talking about the actual toolbar (e.g.,
    > NSToolbarItem)?

    Sorry. I meant the title bar of the window.

    > Changing the color of the window's title bar relies on private classes
    > that could change in the future, and so it's problematic and difficult
    > at best.  It would be easier for you to just use
    > NSBorderlessWindowMask and draw the title bar and other stuff
    > yourself.  There's some good discussion about that on CocoaDev:
    >
    > http://www.cocoadev.com/index.pl?BorderlessWindow

    Thank you.
  • anybody a tip for my? pleace :-D

    best regards

    philippe

    Am 02.10.2006 um 23:28 schrieb Philippe Heinrich Regenass:

    > okey....but i want this look for my first version... i think,when
    > leopard is released, i will change both looks to one "new" leopard
    > look... ;-)
    >
    > but now, i want my black look ;-)
    >
    > Am 02.10.2006 um 23:24 schrieb John Stiles:
    >
    >> History has shown that third party apps which do not conform to
    >> the HIG look stupid after a few years.
    >> This applies to Apple programs as well.
    >>
    >>
    >> On Oct 2, 2006, at 2:20 PM, Philippe Heinrich Regenass wrote:
    >>
    >>> but i want! ;-) pleace, i have too looks, the classic and the
    >>> "modern" black look. i'ts a verry nice look the black but the
    >>> title ;-)
    >>>
    >>> ps: i'ts garageband, itunes... conformable to the Apple Human
    >>> Interface Guidelines? ;-)
    >>>
    >>>
    >>>
    >>>
    >>>
    >>> Am 02.10.2006 um 23:09 schrieb John Stiles:
    >>>
    >>>> Err, maybe you shouldn't use a black background on the toolbar :)
    >>>>
    >>>> On Oct 2, 2006, at 1:57 PM, Philippe Heinrich Regenass wrote:
    >>>>
    >>>>> hi
    >>>>>
    >>>>> i have a toolbar with black background. black on black i'ts not
    >>>>> verry good readable ;-)
    >>>>>
    >>>>>
    >>>>> Am 02.10.2006 um 22:45 schrieb Ricky Sharp:
    >>>>>
    >>>>>>
    >>>>>> On Oct 2, 2006, at 3:33 PM, Philippe Heinrich Regenass wrote:
    >>>>>>
    >>>>>>> i try to change the the title color from NSWindow.
    >>>>>>>
    >>>>>>> i have following code, but i don't know how can i change the
    >>>>>>> color attribute from this objects...
    >>>>>>>
    >>>>>>> NSEnumerator *windowViewsEnum = [[[[self contentView]
    >>>>>>> superview] subviews] objectEnumerator];
    >>>>>>> id viewObject;
    >>>>>>> while (viewObject = [windowViewsEnum nextObject])
    >>>>>>> {
    >>>>>>> NSLog(@"viewObject: %@", [viewObject className]);
    >>>>>>> if ([[viewObject className] isEqualToString:
    >>>>>>> @"_NSThemeWidget"])
    >>>>>>> {
    >>>>>>> [[viewObject cell] setColor: [NSColor redColor]];
    >>>>>>> }
    >>>>>>> }
    >>>>>>>
    >>>>>>> what can i try?
    >>>>>>
    >>>>>> Why do you need to do this?
    >>>>>>
    >>>>>> ___________________________________________________________
    >>>>>> Ricky A. Sharp        mailto:<rsharp...>
    >>>>>> Instant Interactive(tm)  http://www.instantinteractive.com
    >>>>>>
    >>>>>
    >>>>> _______________________________________________
    >>>>> Do not post admin requests to the list. They will be ignored.
    >>>>> Cocoa-dev mailing list      (<Cocoa-dev...>)
    >>>>> Help/Unsubscribe/Update your Subscription:
    >>>>> http://lists.apple.com/mailman/options/cocoa-dev/jstiles%
    >>>>> 40blizzard.com
    >>>>>
    >>>>> This email sent to <jstiles...>
    >>>>
    >>>
    >>
    >
    > _______________________________________________
    > Do not post admin requests to the list. They will be ignored.
    > Cocoa-dev mailing list      (<Cocoa-dev...>)
    > Help/Unsubscribe/Update your Subscription:
    > http://lists.apple.com/mailman/options/cocoa-dev/my-mailing%
    > 40treeinspired.ch
    >
    > This email sent to <my-mailing...>
  • hello

    i have a nstoolbar. i want now change the color from displayed name.
    how can i do this?

    best regards and nice weekend

    philippe
previous month october 2006 next month
MTWTFSS
            1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31          
Go to today