UserControl

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?
 
K

Ken Tucker [MVP]

hi,

Add the textbox to the pictureboxes controls.

me.controls.add(mytextbox)

Ken
 
T

Tom Dacon

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
 
G

Guest

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top