c# - Duplication Controls Winforms -


i have such situation here. let's have 3 button on our form, , 1 control, panel, , hidden when form loaded. here enter image description here

when click on button 1, panel have shown under button1, when clicking on button2, have showned under button2 , on. let's clicked on button2.

enter image description here

now want same panel show, when clicking on button1 , not @ same place. need same panel showed under buttons when clicking them.for example, same panel showing when clicking button 3 enter image description here made working 1 button. can't have 2 controls same attributes, need somehow duplicate control.i , think have done usercontrol.

private void btn_click(control sender, eventargs e) {     var btn = sender button;     panel1.left = btn.left; } 

now assign handler click event buttons.

the var btn.... line represent button clicked, or control triggered event, there can set panel's location.


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -