Some work on GTK focus handling and events.

Removed some code #ifdeffed for GTK from
    wxListCtrl.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14363 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2002-02-23 18:59:46 +00:00
parent 890f8a7c00
commit afbe906abd
8 changed files with 53 additions and 139 deletions

View File

@@ -791,9 +791,19 @@ void wxTextCtrl::SetSelection( long from, long to )
gtk_editable_select_region( GTK_EDITABLE(m_text), (gint)from, (gint)to );
}
void wxTextCtrl::ShowPosition( long WXUNUSED(pos) )
void wxTextCtrl::ShowPosition( long pos )
{
// SetInsertionPoint( pos );
if (m_windowStyle & wxTE_MULTILINE)
{
GtkAdjustment *vp = GTK_TEXT(m_text)->vadj;
float totalLines = (float) GetNumberOfLines();
long posX;
long posY;
PositionToXY(pos, &posX, &posY);
float posLine = (float) posY;
float p = (posLine/totalLines)*(vp->upper - vp->lower) + vp->lower;
gtk_adjustment_set_value(GTK_TEXT(m_text)->vadj, p);
}
}
long wxTextCtrl::GetInsertionPoint() const