| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
I am building a carbon app with popup menus that I need to build programaticly. I find that the controls show up in the UI and when I click on them the popup menu appears, but once released the controls draw with no text in the menu. Here is how I am building the controls:You should set the maximum value of the control to the number of items in menu. Also you don't actually need to create the resource for the menu (in which case pass -12345 as the menuID to CreatePopupButtonControl)
menuID = ::UniqueID('MENU');
err = CreateNewMenu(menuID,0,&newMenu); // create the menu that popup control will use, use ppd control as ID
.... Add some items to the menu....
::AddResource ((char**)newMenu,'MENU',menuID,"\pfoo"); // add it to to the resource map so CreatePopup can find it
err = CreatePopupButtonControl(GetControlOwner(view),location,titleCF,menuID, true,100,teJustLeft,0,&PopupControl);
SetControlPopupMenuHandle(PopupControl,newMenu);
Any ideas on what would cause the control not to draw the currently selected item in the menu?
Thanks much,_______________________________________________
Jason
_______________________________________________
carbon-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/carbon-development
Do not post admin requests to the list. They will be ignored.
| References: | |
| >Why doesn't CreatePopupButtonControl draw? (From: jason rusoff <email@hidden>) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.