usercontrol and parents

if i create a user control "A" that has 3 text boxes in it and add several instances of "A" to a panel...when i mouseover one of the text boxes how can i tell which instance of A it belongs to?

Thanks!

Dan

[245 byte] By [DRoden] at [2007-12-23]
# 1

ctype(Sender,control).parent in mouseover event results in your textbox host (in this case your usercontrol instance)

Remco

RemcoJVG at 2007-8-30 > top of Msdn Tech,Visual Basic,Visual Basic Language...
# 2
that gets me the panel that i added the instead of "A" to not the instance of "A"....
DRoden at 2007-8-30 > top of Msdn Tech,Visual Basic,Visual Basic Language...
# 3

DRoden wrote:
that gets me the panel that i added the instead of "A" to not the instance of "A"....

Your english is hard to understand

But i think u got

a panel with contans a few instances of a usercontrol : "ControlA"

The usercontrol contains 3 textbox controls

..........

ctype(Sender,control).parent in mouseover event in your usercontrol results indeed in your panel instance but check it in the mouseover event of the textbox wil result in your usercontrol instance

Remco

RemcoJVG at 2007-8-30 > top of Msdn Tech,Visual Basic,Visual Basic Language...
# 4

i think i need textbox.getcontainercontrol....

DRoden at 2007-8-30 > top of Msdn Tech,Visual Basic,Visual Basic Language...
# 5

exually (i think) it would give you the panel where the usercontrol is hosted in

But whatever works. right

Remco

RemcoJVG at 2007-8-30 > top of Msdn Tech,Visual Basic,Visual Basic Language...