View Single Post
Old 04-21-2011, 03:57 AM   PM User | #4
NorthernPike
New to the CF scene

 
Join Date: Apr 2011
Posts: 1
Thanks: 0
Thanked 1 Time in 1 Post
NorthernPike is an unknown quantity at this point
popupMenuButton

I just went through hell using this control. Didn't realize that the left button dispatches an itemClick event as well as a click event. This makes it nearly impossible to determine whether the user clicked a selection of the menu or just clicked the button. My boss turned me on to this control thinking it was what I was looking for. Not so. I wanted a button to pop-up a menu. Not change the button behavior dynamically via user selection of a menu item. The use of this control is what is confusing people. It's not a menu provider. It's a dynamic button who's functionality can be changed by the user via menu selections. It's a very cool control when used for it's intended purpose. But try using it as a menu and it will fight you all the way.
Now, the popupButton, parent to the popupMenuButton, can popup anything derived from UIComponent. So I popped up a menu. This controls button does NOT dispatch an itemClick event when clicked as it's child, popupMenuButton, does. That's a big difference. One allows the developer to present the user with any UIComponent be it a calender, password type input, list of items etc... The other allows a user to set the functionality of the button at runtime. Very powerfull. But it is not a menu provider and should not be used as such. It's name, popupMenuButton is very missleading.
NorthernPike is offline   Reply With Quote
Users who have thanked NorthernPike for this post:
wac (04-21-2011)