Re: Many similar controls; best practices?
Re: Many similar controls; best practices?
- Subject: Re: Many similar controls; best practices?
- From: Edward Hillenbrand <email@hidden>
- Date: Sat, 15 Jan 2005 23:28:18 -0700
On Jan 15, 2005, at 10:30 PM, Charlton Wilbur wrote:
I'm working on a view in Interface Builder. This part of the
application has 11 editable numeric values; each value has a label, a
text box for editing the value, a stepper to increment the number, and
a text field to show a bit of data calculated from the number.
Obviously I can just put 11 labels, 22 text boxes, and 11 steppers
into Interface Builder (and that's what the prototype does) but I was
wondering if there's a better/simpler/cleaner way to do this --
perhaps a table of custom views?
http://developer.apple.com/documentation/DeveloperTools/Conceptual/
IBTips/Articles/FreqAskedQuests.html
"Any widget that has an NSCell counterpart can be made into a matrix.
Hold down the Option key while you drag a selection handle. The farther
you drag the handle, the more new rows and columns are appended to the
matrix. Some other widgets, such as NSBrowser and NSForm, work the same
way."
So, just make one column for the labels, two for the text fields, and
one for the steppers.
In your controller add four NSMatrix outlets and connect them to each
column.
-- Ed
_______________________________________________
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