Quote:
Originally Posted by NorthernPike
The use of this control is what is confusing people. It's not a menu provider.
|
I disagree. It is, in fact, a menu provider - with the added feature of allowing a user-selectable default action. As you stated, it is very powerful - as a menu provider. While it may, depending on your approach, bring additional programmer-work to the table, that is no reason to avoid its use. Especially in cases where a user may want to establish a default action for a particular session there is no control better suited.
The popupMenuButton is what it is - a custom control, albeit one provided by Adobe. The better approach is to learn the techniques necessary to use this control as it was intended.
To the original question:
While these controls do provide
similar functionality, that functionality is not necessarily exactly the same.
The Combobox: while it can be used (with the proper techniques) to function as a menu selection choice, its primary function is similar to that of a <select> tag in html - to provide a limited number of
values to a particular prompt, as opposed to requiring the user to manually enter a value. This can be used to help the user and to the programmer by limiting the user-selected values to a pre-determined list of acceptable choices - a "white-list", if you will.
The PopupMenuButton: is designed to pop-up a menu, and thereby providing a list of available
actions (as opposed to values) for the user to select (assuming it is used properly).
The PopupButton: can be used to pop-up a menu but also (as NorthernPike noted) it can pop-up any UIComponent - which may present a possible action (or actions) or a possible value (or values) depending on the context in which it is used.
The deciding factors are (1) the context in which the control is to be used, and (2) the GUI used by the application. In other words ...
Quote:
Originally Posted by nikos101
Its all up to your taste. ;-)
|