implement HitTest(pos) variant and not HitTest(x, y) one as this is what Windows gives us

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28433 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2004-07-23 18:43:32 +00:00
parent 9539029134
commit 6726a6b097
2 changed files with 4 additions and 9 deletions

View File

@@ -1361,7 +1361,7 @@ bool wxTextCtrl::PositionToXY(long pos, long *x, long *y) const
}
wxTextCtrlHitTestResult
wxTextCtrl::HitTest(const wxPoint& pt, wxTextCoord *col, wxTextCoord *row) const
wxTextCtrl::HitTest(const wxPoint& pt, long *posOut) const
{
// first get the position from Windows
LPARAM lParam;
@@ -1440,11 +1440,8 @@ wxTextCtrl::HitTest(const wxPoint& pt, wxTextCoord *col, wxTextCoord *row) const
else
rc = wxTE_HT_ON_TEXT;
// finally translate to column/row
if ( !PositionToXY(pos, col, row) )
{
wxFAIL_MSG( _T("PositionToXY() not expected to fail in HitTest()") );
}
if ( posOut )
*posOut = pos;
return rc;
}