Create an NSPopUpButton and size it appropriately
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22816 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -13,6 +13,8 @@
|
||||
#include "wx/choice.h"
|
||||
#include "wx/log.h"
|
||||
|
||||
#import <AppKit/NSPopUpButton.h>
|
||||
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxChoice, wxControl)
|
||||
BEGIN_EVENT_TABLE(wxChoice, wxChoiceBase)
|
||||
END_EVENT_TABLE()
|
||||
@@ -29,8 +31,14 @@ bool wxChoice::Create(wxWindow *parent, wxWindowID winid,
|
||||
if(!CreateControl(parent,winid,pos,size,style,validator,name))
|
||||
return false;
|
||||
|
||||
SetNSView([[NSPopUpButton alloc] initWithFrame:MakeDefaultNSRect(size)
|
||||
pullsDown: NO]);
|
||||
|
||||
[m_cocoaNSView sizeToFit];
|
||||
if(m_parent)
|
||||
m_parent->CocoaAddChild(this);
|
||||
SetInitialFrameRect(pos,size);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user