Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Popup menu Not Displaying Selected Item
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Popup menu Not Displaying Selected Item



This has come up on this list countless times before however i have unable to find a solution.

I create a popup menu using CreatePopupButtonControl, populate the control with a menu. The popup displays and i can set a default menu item however when a menu item is selected it does not get selected in the control. My code is below:

CreatePopupButtonControl( mDialogRef , &editBox1Rect, NULL , -12345 , true , 0 , teFlushLeft , NULL , &editBox1ref );
SetControlData(editBox1ref, kControlNoPart, kControlPopupButtonMenuRefTag, sizeof(MenuRef), Ptr( &theMenuRef ) );
//SetControlData(editBox1ref, kControlNoPart, kControlPopupButtonOwnedMenuRefTag, sizeof(MenuRef), Ptr( &theMenuRef ) );
//SetControlData( editBox1ref , 0, kControlPopupButtonMenuRefTag, index, &theMenuRef );
//SetControl32BitMaximum( editBox1ref, index );

UInt16 menuItemCount = CountMenuItems( theMenuRef );
HIViewSetMaximum( editBox1ref , menuItemCount);

As you can see i have tried different ways of setting the number of menu items in the list but the issue still persists.

Does anyone have any suggestions?

Thanks in advance

Tony



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.