+
+ if ( m_editable && m_editInPlace )
+ {
+ int x, y, width, height;
+ if ( m_currentRect.x <= 0 )
+ {
+ x = 0;
+ width = m_currentRect.width + wxIPE_ADJUST;
+ }
+ else
+ {
+ x = m_currentRect.x - wxIPE_ADJUST;
+ width = m_currentRect.width + wxIPE_ADJUST*2;
+ }
+
+ if ( m_currentRect.y <= 0 )
+ {
+ y = 0;
+ height = m_currentRect.height + wxIPE_ADJUST;
+ }
+ else
+ {
+ y = m_currentRect.y - wxIPE_ADJUST;
+ height = m_currentRect.height + wxIPE_ADJUST*2;
+ }
+
+ m_inPlaceTextItem->SetSize( x, y, width, height );
+
+ if ( cell ) {
+ m_inPlaceTextItem->SetFont( cell->GetFont() );
+ m_inPlaceTextItem->SetBackgroundColour(cell->GetBackgroundColour());
+ m_inPlaceTextItem->SetForegroundColour(cell->GetTextColour());
+
+ if ( cell->GetTextValue().IsNull() ) {
+ m_inPlaceTextItem->SetValue( "" );
+ }
+ else {
+ m_inPlaceTextItem->SetValue( cell->GetTextValue() );
+ }
+ }
+
+ m_inPlaceTextItem->Show(TRUE);
+ m_inPlaceTextItem->SetFocus();
+#if defined(__VISAGECPP__)
+ {
+ int highlight = wxIPE_HIGHLIGHT;
+ if (highlight != 0)
+ HighlightCell(dc, TRUE);
+ }
+#else
+ if (wxIPE_HIGHLIGHT != 0)
+ HighlightCell(dc, TRUE);
+#endif
+ }
+ else
+ {
+ // 1) Why isn't this needed for Windows??
+ // Probably because of the SetValue?? JS.
+ // 2) Arrrrrgh. This isn't needed anywhere,
+ // of course. One hour of debugging... RR.
+ //
+ // 3) It *is* needed for Motif - michael
+ //
+#if defined(__WXMOTIF__)
+ if ((wxIPE_HIGHLIGHT || !(m_editable && m_editInPlace)))
+ HighlightCell(dc, TRUE);