Drag & Drop to TabPage on TabControl

Drag & Drop to TabPage on TabControl

Post by sneila200 » Mon, 10 Jan 2005 19:18:06


Hi all

Has anyone successfully dropped onto a TabPage Tab? I've spent the
evening on it and have only succeeded in triggering the TabControl
DragEnter event and cannot seem to trigger the TabPage DragEnter
event, for some reason (AllowDrop is set to true). I've tried getting
the TabPage via e.X & e.Y (using GetTabRect() for TabControl TabPages)
but the coordinates are too large for the TabPages (i.e. the e.X & e.Y
might be 227 & 406 but the Rect coords are 2,2 & 2,60 etc).

If anyone can point me in the right direction it would be much
appreciated.

Thanks
Richard
 
 
 

Drag & Drop to TabPage on TabControl

Post by Mick Doher » Mon, 10 Jan 2005 20:12:55

Try using TabControl.PointToClient(New Point(e.X, e.Y))

If you're still having trouble take a look at the source on my site:
http://www.yqcomputer.com/ ; Reposition TabItems at Runtime

--
Mick Doherty
http://www.yqcomputer.com/

 
 
 

Drag & Drop to TabPage on TabControl

Post by Richard Se » Tue, 11 Jan 2005 04:00:31


Hi Mick

Thanks very much for your reply. I'll try this later today but from
what I can see I should be able to get it going with this.

Cheers
Richard



*** Sent via Developersdex http://www.yqcomputer.com/ ***
Don't just participate in USENET...get rewarded for it!