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:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user