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



Answer this question

usercontrol and parents

  • Webbert

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

    But whatever works. right

    Remco


  • amitsinha

     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 


  • Richard Meijer

    i think i need textbox.getcontainercontrol....


  • Christopher Bennage

    that gets me the panel that i added the instead of "A" to not the instance of "A"....
  • play_

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

    Remco


  • usercontrol and parents