Make appropriate use of MakeDefaultNSRect and SetInitialFrameRect
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22815 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -41,12 +41,14 @@ bool wxComboBox::Create(wxWindow *parent, wxWindowID winid,
|
||||
return false;
|
||||
|
||||
m_cocoaNSView = NULL;
|
||||
SetNSTextField([[NSComboBox alloc] initWithFrame:NSMakeRect(0,0,30,30)]);
|
||||
SetNSTextField([[NSComboBox alloc] initWithFrame:MakeDefaultNSRect(size)]);
|
||||
[m_cocoaNSView release];
|
||||
[GetNSTextField() setStringValue:wxNSStringWithWxString(value.c_str())];
|
||||
[GetNSControl() sizeToFit];
|
||||
if(m_parent)
|
||||
m_parent->CocoaAddChild(this);
|
||||
SetInitialFrameRect(pos,size);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user