MenuHandle NewUniqueMenu()
{
- MenuHandle handle = NewMenu( nextPopUpMenuId , "\pMenu" ) ;
+ MenuHandle handle = UMANewMenu(nextPopUpMenuId, wxString(wxT("Menu")), wxFont::GetDefaultEncoding() );
nextPopUpMenuId++ ;
return handle ;
static const wxCoord MARGIN = 2;
static const int TEXTFOCUSBORDER = 0 ;
#endif
-static const int POPUPHEIGHT = 23;
// ----------------------------------------------------------------------------
wxCommandEvent event( wxEVT_COMMAND_BUTTON_CLICKED, def->GetId() );
event.SetEventObject(def);
def->Command(event);
- }
+ }
}
return;
void wxComboBox::Init()
{
- m_container.SetContainerWindow(this);
+ WX_INIT_CONTROL_CONTAINER();
}
bool wxComboBox::Create(wxWindow *parent,
}
// Needed because it is a wxControlWithItems
- SetBestSize(size);
+ SetInitialSize(size);
SetStringSelection(value);
return true;
void wxComboBox::SetInsertionPoint(long pos)
{
- // TODO
+ if ( m_text )
+ m_text->SetInsertionPoint(pos);
}
void wxComboBox::SetInsertionPointEnd()
{
- // TODO
+ if ( m_text )
+ m_text->SetInsertionPointEnd();
}
long wxComboBox::GetInsertionPoint() const
{
- // TODO
+ if ( m_text )
+ return m_text->GetInsertionPoint();
return 0;
}
wxTextPos wxComboBox::GetLastPosition() const
{
- // TODO
+ if ( m_text )
+ return m_text->GetLastPosition();
return 0;
}
void wxComboBox::Replace(long from, long to, const wxString& value)
{
- // TODO
+ if ( m_text )
+ m_text->Replace(from,to,value);
}
void wxComboBox::Remove(long from, long to)
{
- // TODO
+ if ( m_text )
+ m_text->Remove(from,to);
}
void wxComboBox::SetSelection(long from, long to)
{
- // TODO
+ if ( m_text )
+ m_text->SetSelection(from,to);
}
int wxComboBox::DoAppend(const wxString& item)
m_choice->SetSelection( n );
if ( m_text != NULL )
- m_text->SetValue(GetString(n));
+ m_text->SetValue(n != wxNOT_FOUND ? GetString(n) : wxString(wxEmptyString));
}
int wxComboBox::FindString(const wxString& s, bool bCase) const