- m_peer->SetValueAndRange( n > 0 ? 1 : 0 , 0 , 0 ) ;
- MacPostControlCreate(pos,size) ;
- // TODO wxCB_SORT
- for ( int i = 0; i < n; i++ )
- {
- Append(choices[i]);
- }
- SetBestSize(size); // Needed because it is a wxControlWithItems
- return TRUE;
+ m_peer->SetValueAndRange( n > 0 ? 1 : 0 , 0 , 0 );
+ MacPostControlCreate( pos, size );
+
+#if !wxUSE_STL
+ if ( style & wxCB_SORT )
+ // autosort
+ m_strings = wxArrayString( 1 );
+#endif
+
+ Append(n, choices);
+
+ // Set the first item as being selected
+ if (n > 0)
+ SetSelection( 0 );
+
+ // Needed because it is a wxControlWithItems
+ SetInitialSize( size );
+
+ return true;