TTabControl.IndexOfTabAt() always returns -1
Original Reporter info from Mantis: Simon Ameis @SAmeis
-
Reporter name: Simon Ameis
Original Reporter info from Mantis: Simon Ameis @SAmeis
- Reporter name: Simon Ameis
Description:
The method TTabControl.IndexOfTabAt() always returns -1 regardless of the point clicked.
Steps to reproduce:
Place a TTabControl on a form, add a PopupMenu with one MenuItem. Also assign an event handler to OnContextPopup of the tab control.
Inside the event handler place the call to IndexOfTabAt() like
procedure TForm1.TabControl1ContextPopup(Sender: TObject; MousePos: TPoint; var Handled: Boolean); var IdxTab: Integer; begin IdxTab := TabControl1.IndexOfTabAt(MousePos.X, MousePos.Y); end;
Additional information:
May be related to #24022 (closed)
Mantis conversion info:
- Mantis ID: 27467
- OS: Windows
- OS Build: 8.1 64bit
- Build: 47519
- Version: 1.3 (SVN)
- Fixed in version: 1.7 (SVN)
- Fixed in revision: r53978 (#87c8c7df)
- Target version: 1.6.4