m_text = gtk_entry_new();
}
- wxSize newSize = size;
- if (newSize.x == -1) newSize.x = 80;
- if (newSize.y == -1) newSize.y = 26;
- SetSize( newSize.x, newSize.y );
+ SetSizeOrDefault( size );
m_parent->DoAddChild( this );
{
/* this moves the cursor pos to behind the inserted text */
gint len = GTK_EDITABLE(m_text)->current_pos;
-
+
#if wxUSE_UNICODE
wxWX2MBbuf buf = text.mbc_str();
gtk_editable_insert_text( GTK_EDITABLE(m_text), buf, strlen(buf), &len );
UpdateWindowUI();
}
+
+wxSize wxTextCtrl::DoGetBestSize() const
+{
+ // FIXME should be different for multi-line controls...
+ return wxSize(80, 26);
+}