Re: north - east - south - west selector using NSMatrix?
Re: north - east - south - west selector using NSMatrix?
- Subject: Re: north - east - south - west selector using NSMatrix?
- From: Ricky Sharp <email@hidden>
- Date: Tue, 29 Aug 2006 16:54:50 -0500
On Aug 29, 2006, at 4:19 PM, patrick machielse wrote:
I'm trying to implement a control area for selecting a direction
(north - east - south - west, or top - right - bottom - left). Only
one of these choices can be selected at one time.
My first try was to use an NSMatrix with radio buttons. In IB I
created a 3x3 matrix of radio buttons and I disabled and made
transparent the buttons at indeces 0, 2, 4, 6, and 8. The problem
is that I can still 'select' the buttons at these indexes by
clicking on their locations, in which case none of the enabled and
visible radio buttons is selected.
Since this type of control seems fairly common, I was wondering
what solutions other people are using, and if there is a better way
to do it than I'm using now (I suppose so!).
I was able to do what you want, without the side-effects you report
above.
I did this on 10.4.7 (not sure what things will do on 10.3 and earlier)
Started with a square push button and set it to have an "On/Off"
behavior. Dragged out a 3 x 3 matrix. Center and four corner cells
were set to be disabled and to not have a border. "North" cell set
to be selected. Matrix mode set to Radio.
Clicking in any of the "dead" cells does nothing. Clicking on the
others lets you select them and you can even drag-select amongst the
four choices.
I'll e-mail you my test nib privately.
___________________________________________________________
Ricky A. Sharp mailto:email@hidden
Instant Interactive(tm) http://www.instantinteractive.com
_______________________________________________
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