A case for overlapping views?
A case for overlapping views?
- Subject: A case for overlapping views?
- From: Ricky Sharp <email@hidden>
- Date: Fri, 28 Jan 2005 14:51:36 -0600
In an app with a custom UI, I have the need on a few occasions to have
something like this:
(*) First option
Value: [123]
( ) Second option
Value: [456]
Here's my view hierarchy:
+ NSWindow
+ NSView (Content View)
+ IIRadioGroup (NSMatrix subclass)
+ IIButtonCell (First option)
+ IIButtonCell (Second option)
+ IIStaticText (first 'value' prompt)
+ IIValueField (first value field '123')
+ IIStaticText (second 'value' prompt)
+ IIValueField (second value field '456')
To achieve this, I specified an appropriate value for the 'y' spacing
in my NSMatrix subclass. I then purposefully overlapped the first
static text and value field items in the "dead space" between my radio
buttons.
In testing this in IB, I don't see any rendering problems when
interacting with the widgets via the mouse or keyboard (these widgets
honor full keyboard access).
Also looked at things via Quartz Debug and it seems to be doing the
right thing when updating.
I could have created two separate radio buttons not in a matrix. While
I wouldn't have overlapping views, the user experience when interacting
with this radio button pair would be different. For example, user
couldn't use up or down arrow keys to select previous/next radio
buttons.
Are there any gotchas with using overlapping views in this particular
situation? Oh, some more detail that may be helpful:
* All my widgets return NO from their isOpaque methods.
* All my widgets never first erase their background.
Because of these two facts, I believe I shouldn't have any issues when
these widgets are rendered.
If there are serious gotchas, I'll return to having the separate radio
buttons (not in a matrix) and write appropriate code to provide the
same user experience as if they were in a matrix.
___________________________________________________________
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