Mailing Lists: Apple Mailing Lists

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

Popup Button not behaving as expected



There was a time when life was simpler....but using the Appearance Manager. Well!

I created a window using GetNewCWindow()...OK

Then I created Popup Control by calling GetNewControl()...OK

Upon contentClick by the Event, I use the following code:

static void PopupControl(WindowRef pWindow, EventRecord *pEvent)
{
  Point mouse;
  ControlRef theControl;
  SInt16 part;

  DoSomeProcessing();

mouse = pEvent->where;
GlobalToLocal(&mouse);
theControl = FindControlUnderMouse(mouse, pWindow, &part);
if (HandleControlClick(theControl, mouse, pEvent->modifiers, (ControlActionUPP) -1)) {
short value = GetControlValue(theControl);
etc.
}
}


The tracking works well but the selection in the menu always returns to the top of the list. It would not show the menu selection chosen after releasing the mouse button, thus returning to a value of one.

This has worked using pre-Mac OS.

Any suggestions will be appreciated.

Thank you

_________________________________________________________________
Don’t just search. Find. Check out the new MSN Search! http://search.msn.click-url.com/go/onm00200636ave/direct/01/


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

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 © 2007 Apple Inc. All rights reserved.