{
wxSize size = m_choice->GetBestSize();
- if ( m_text != 0 )
+ if ( m_text != NULL )
{
wxSize sizeText = m_text->GetBestSize();
wxControl::DoMoveWindow(x, y, width, height);
- if ( m_text == 0 )
+ if ( m_text == NULL )
{
m_choice->SetSize(0, 0 , width, -1);
}
return TRUE;
}
- void wxComboBox::SetFocus()
- {
- m_text->SetFocus();
- }
+void wxComboBox::SetFocus()
+{
+ if ( m_text != NULL) {
+ m_text->SetFocus();
+ }
+}
-void wxComboBox::DelegateTextChanged( const wxString& value ) {
+void wxComboBox::DelegateTextChanged( const wxString& value )
+{
}
wxSize csize = size;
if ( style & wxCB_READONLY )
{
- m_text = 0;
+ m_text = NULL;
}
else
{
{
wxString result;
- if ( m_text == 0 )
+ if ( m_text == NULL )
{
result = m_choice->GetString( m_choice->GetSelection() );
}
// Clipboard operations
void wxComboBox::Copy()
{
- if ( m_text != 0 )
+ if ( m_text != NULL )
{
m_text->Copy();
}
void wxComboBox::Cut()
{
- if ( m_text != 0 )
+ if ( m_text != NULL )
{
m_text->Cut();
}
void wxComboBox::Paste()
{
- if ( m_text != 0 )
+ if ( m_text != NULL )
{
m_text->Paste();
}
void wxComboBox::SetEditable(bool editable)
{
- if ( ( m_text == 0 ) && editable )
+ if ( ( m_text == NULL ) && editable )
{
m_text = new wxComboBoxText( this );
}
- else if ( ( m_text != 0 ) && !editable )
+ else if ( ( m_text != NULL ) && !editable )
{
delete m_text;
- m_text = 0;
+ m_text = NULL;
}
int currentX, currentY;
{
m_choice->SetSelection( n );
- if ( m_text != 0 )
+ if ( m_text != NULL )
{
m_text->SetValue( GetString( n ) );
}
{
wxSize size = m_choice->GetBestSize();
- if ( m_text != 0 )
+ if ( m_text != NULL )
{
wxSize sizeText = m_text->GetBestSize();
wxControl::DoMoveWindow(x, y, width, height);
- if ( m_text == 0 )
+ if ( m_text == NULL )
{
m_choice->SetSize(0, 0 , width, -1);
}
return TRUE;
}
- void wxComboBox::SetFocus()
- {
- m_text->SetFocus();
- }
+void wxComboBox::SetFocus()
+{
+ if ( m_text != NULL) {
+ m_text->SetFocus();
+ }
+}
-void wxComboBox::DelegateTextChanged( const wxString& value ) {
+void wxComboBox::DelegateTextChanged( const wxString& value )
+{
}
wxSize csize = size;
if ( style & wxCB_READONLY )
{
- m_text = 0;
+ m_text = NULL;
}
else
{
{
wxString result;
- if ( m_text == 0 )
+ if ( m_text == NULL )
{
result = m_choice->GetString( m_choice->GetSelection() );
}
// Clipboard operations
void wxComboBox::Copy()
{
- if ( m_text != 0 )
+ if ( m_text != NULL )
{
m_text->Copy();
}
void wxComboBox::Cut()
{
- if ( m_text != 0 )
+ if ( m_text != NULL )
{
m_text->Cut();
}
void wxComboBox::Paste()
{
- if ( m_text != 0 )
+ if ( m_text != NULL )
{
m_text->Paste();
}
void wxComboBox::SetEditable(bool editable)
{
- if ( ( m_text == 0 ) && editable )
+ if ( ( m_text == NULL ) && editable )
{
m_text = new wxComboBoxText( this );
}
- else if ( ( m_text != 0 ) && !editable )
+ else if ( ( m_text != NULL ) && !editable )
{
delete m_text;
- m_text = 0;
+ m_text = NULL;
}
int currentX, currentY;
{
m_choice->SetSelection( n );
- if ( m_text != 0 )
+ if ( m_text != NULL )
{
m_text->SetValue( GetString( n ) );
}