(GtkAttachOptions)(GTK_FILL | GTK_EXPAND | GTK_SHRINK),
0, 0);
+ /* always wrap words */
+ gtk_text_set_word_wrap( GTK_TEXT(m_text), TRUE );
+
/* put the horizontal scrollbar in the lower left hand corner */
if (bHasHScrollbar)
{
GTK_FILL,
0, 0);
gtk_widget_show(hscrollbar);
- }
+#if (GTK_MINOR_VERSION > 0)
+ /* don't wrap lines, otherwise we wouldn't need the scrollbar */
+ gtk_text_set_line_wrap( GTK_TEXT(m_text), FALSE );
+#endif
+ }
+
/* finally, put the vertical scrollbar in the upper right corner */
m_vScrollbar = gtk_vscrollbar_new( GTK_TEXT(m_text)->vadj );
GTK_WIDGET_UNSET_FLAGS( m_vScrollbar, GTK_CAN_FOCUS );
wxCHECK_RET( m_text != NULL, _T("invalid text ctrl") );
wxControl::SetBackgroundColour( colour );
+
+ if (!m_widget->window) return;
wxColour sysbg = wxSystemSettings::GetSystemColour( wxSYS_COLOUR_BTNFACE );
if (sysbg.Red() == colour.Red() &&
if (m_windowStyle & wxTE_MULTILINE)
{
GdkWindow *window = GTK_TEXT(m_text)->text_area;
+ if (!window) return;
m_backgroundColour.CalcPixel( gdk_window_get_colormap( window ) );
gdk_window_set_background( window, m_backgroundColour.GetColor() );
gdk_window_clear( window );