Same as last one..

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
1998-05-30 17:11:51 +00:00
parent 1c005ff76d
commit 7f4dc78d35
15 changed files with 844 additions and 24 deletions

View File

@@ -50,12 +50,6 @@ bool wxTextCtrl::Create( wxWindow *parent, const wxWindowID id, const wxString &
else
m_widget = gtk_entry_new();
if (!value.IsNull())
{
gint tmp = 0;
gtk_editable_insert_text( GTK_EDITABLE(m_widget), value, value.Length(), &tmp );
};
wxSize newSize = size;
if (newSize.x == -1) newSize.x = 80;
if (newSize.y == -1) newSize.y = 26;
@@ -63,6 +57,12 @@ bool wxTextCtrl::Create( wxWindow *parent, const wxWindowID id, const wxString &
PostCreation();
if (!value.IsNull())
{
gint tmp = 0;
gtk_editable_insert_text( GTK_EDITABLE(m_widget), value, value.Length(), &tmp );
};
Show( TRUE );
return TRUE;
@@ -103,9 +103,10 @@ void wxTextCtrl::SetValue( const wxString &value )
void wxTextCtrl::WriteText( const wxString &text )
{
if (text.IsNull()) return;
if (m_windowStyle & wxTE_MULTILINE)
{
gint len = gtk_text_get_length( GTK_TEXT(m_widget) );
gint len = gtk_text_get_length( GTK_TEXT(m_widget) ) - 1;
gtk_editable_insert_text( GTK_EDITABLE(m_widget), text, text.Length(), &len );
}
else