Re: NSPopupButton in NSTableView column header
Re: NSPopupButton in NSTableView column header
- Subject: Re: NSPopupButton in NSTableView column header
- From: SA Dev <email@hidden>
- Date: Fri, 13 May 2005 06:20:45 -0400
Duncan:
I wouldn't use a table view. I actually created a custom view and
drew a 1-pixel-wide image, with its width scaled to match the width
of the view for the background. I then placed my borderless popups
and buttons where I wanted them for navigation, then drew 1-pixel-
wide gradient separator lines all according to the width of the view.
Figuring out the proper width and placement of all the controls based
on the view's size is a bit of an exercise in patience because you
can't see the results until you recompile, but this whole method
works very well.
I split this up so that the background image and the separator
lines are done in drawRect, the initial size and placement of the
buttons and popup are done on awakeFromNib, and set the auto resize
on the controls to follow along (I read somewhere else that someone
tried resizing/positioning controls all in their drawRect - a bad
idea - so I thought I'd make that part clear).
It may not be the *best* way, but it works just fine for me.
On May 13, 2005, at 1:27 AM, Duncan Campbell wrote:
Hi folks.
I'm trying to make a graded toolbar (like the one in XCode that has
the arrows for navigating bettween documents, and the popupbutton
listing the current open documents).
I have put an NSTableView on my form, set columns to 0 and then
added an NSPopupButton through code - which works great. However, I
would like the lines on either side of the popup so I am wondering
if perhaps I should add the NSPopupButton to a column header instead.
Does anyone have any sample code of how this can be done?
Cheers.
Duncan Campbell
=====================
http://www.duncanandsarah.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40silentalcove.net
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden