• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Filling gradient in NSTableHeaderView not working properly
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Filling gradient in NSTableHeaderView not working properly


  • Subject: Filling gradient in NSTableHeaderView not working properly
  • From: Devarshi Kulshreshtha <email@hidden>
  • Date: Tue, 13 Dec 2011 20:39:32 +0530

Hi all,

I am trying to fill gradient in header of tableview. So far I am able to
achieve it by subclassing NSTableHeaderView and using this code in
it-

- (void)drawRect:(NSRect)dirtyRect {
        // Drawing code here.

        NSGradient *gradientToFill = [[NSGradient alloc]
initWithStartingColor:[NSColor colorWithCalibratedRed:0.8828125 green:
0.8984375 blue:0.91015625 alpha:1.0]
 endingColor:[NSColor colorWithCalibratedRed:
0.5546875 green:0.59765625 blue:0.66015625 alpha:1.0] ];
        [gradientToFill drawInRect:dirtyRect angle:90];
}

So earlier it was appearing like this-

http://db.tt/PVE9rnXu<http://www.google.com/url?sa=D&q=http://db.tt/PVE9rnXu&usg=AFQjCNEIuYicJ1GFjsSvZcX0sqWsacM94g>


Now it is appearing like this-

http://db.tt/D1zrJJJa<http://www.google.com/url?sa=D&q=http://db.tt/D1zrJJJa&usg=AFQjCNEV4NOJZ4OehohH4aQmXMeFpfZk3A>


As shown in above screen-shot, when I used this code I faced few problems:

1. Column header titles are not getting displayed.
2. Header column separators are not appearing.

Can anyone suggest me how to resolve these problems or some better way to
implement it?

Thanks !
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Filling gradient in NSTableHeaderView not working properly
      • From: Nick Zitzmann <email@hidden>
  • Prev by Date: Re: why does this method return an id?
  • Next by Date: Re: "byte orders" question
  • Previous by thread: Our app can't store a simple key/value pair in iCloud. Any idea why?
  • Next by thread: Re: Filling gradient in NSTableHeaderView not working properly
  • Index(es):
    • Date
    • Thread