UserControl

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a usercontrol that inherits from PictureBox control. I've added a
textbox to the usercontrol. How do I get the textbox to show up on the
usercontrol picturebox?
 
hi,

Add the textbox to the pictureboxes controls.

me.controls.add(mytextbox)

Ken
 
You'd have an easier time of it if you inherited from Container, either
directly or indirectly, such as via a class like UserControl. Since
PictureBox doesn't inherit from Container in any way, it can't easily
contain other controls such as TextBox controls. The conventional way to do
this is to inherit from UserControl.

Tom Dacon
Dacon Software Consulting
 
I had it added but it doesn't show up in the picture box. Do I have to
redraw it in the picture box paint event and if so, how do I do this.
 
Back
Top