Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why doesn't CreatePopupButtonControl draw?



On 7/27/04 12:41 PM, jason rusoff didst favor us with:

> 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:
>
> 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,t
> rue,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?

It's one of the most commonly mentioned problem on the list: You have to set
the control's maximum value to the number of items in the menu.

Larry
_______________________________________________
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>)



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.