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 );
/* bring editable's cursor uptodate. bug in GTK. */
- GTK_EDITABLE(m_text)->current_pos = pos;
+ GTK_EDITABLE(m_text)->current_pos = (guint32)pos;
}
}
if ((key_event.KeyCode() == WXK_RETURN) && !(m_windowStyle & wxTE_MULTILINE))
{
wxWindow *top_frame = m_parent;
- while (top_frame->GetParent() && !(top_frame->GetParent()->m_isFrame))
+ while (top_frame->GetParent() && !(top_frame->IsTopLevel()))
top_frame = top_frame->GetParent();
GtkWindow *window = GTK_WINDOW(top_frame->m_widget);
if ((window) && !(GTK_WIDGET_NO_WINDOW(m_widget)))
gdk_window_set_cursor( window, cursor.GetCursor() );
}
+
+ UpdateWindowUI();
+}
+
+wxSize wxTextCtrl::DoGetBestSize() const
+{
+ // FIXME should be different for multi-line controls...
+ return wxSize(80, 26);
}