by Gregory Weston <uce@[EMAIL PROTECTED]
>
Apr 12, 2008 at 11:12 AM
In article <48000931$0$30484$607ed4bc@[EMAIL PROTECTED]
>,
slashlos <slashlos@[EMAIL PROTECTED]
> wrote:
> I've decided (hopefully well received) on using a popup button as a
> multiple selection control.
It won't be well-received. It breaks the semantics of the control and
won't look or behave the way users are used to popup buttons looking and
behaving. From the HIG:
"Use a pop-up menu to present up to 12 _mutually_exclusive_ choices ...."
....
"Avoid using pop-up menus ... [w]hen more than one simultaneous
selection is appropriate, such as in a list of text styles (from which
users might choose both bold and italic). In this situation, you should
instead use checkboxes or a pull-down menu in which checkmarks appear."
> But the question is how can I get the visual to mimic the model? Do I
> need to sub-class the popup button so I can have multiple selections?
That's a start. You also have to worry about how you're going to display
the appropriate title (considering the standard behavior is to show the
last item selected) to indicate multiple selections and how you're going
to make that title *meaningful* in the inherently-limited horizontal
space you'll have available.
The short form is: If you find yourself having to do this much work to
get a standard control to work in Cocoa, you're probably abusing the
control which means you're probably going to annoy users who are
confused by your UI.