Implement ShowPosition() for single-line wxTextCtrl (wxGTK)

This commit is contained in:
Artur Wieczorek 2017-07-29 22:07:42 +02:00
parent f208cfc886
commit 2c2e0aaa01
2 changed files with 6 additions and 0 deletions

View File

@ -163,6 +163,7 @@ wxGTK:
- Fix displaying labels of wxRadioBox items.
- Add a native implementation for clearing bitmap/window wxGraphicsContexts
- Implement XYToPosition() for single-line wxTextCtrl.
- Implement ShowPosition() for single-line wxTextCtrl.
wxMSW:

View File

@ -1444,6 +1444,11 @@ void wxTextCtrl::ShowPosition( long pos )
else
gtk_text_view_scroll_mark_onscreen(GTK_TEXT_VIEW(m_text), mark);
}
else // single line
{ // This function not only shows character at required position
// but also places the cursor at this position.
gtk_editable_set_position(GTK_EDITABLE(m_text), pos);
}
}
wxTextCtrlHitTestResult