Find a Parent Control of Control

G

Guest

Some one help me out.

I have a windows form.I added Panel to a windows form.
I put a textbox in a Panel.

When ever I try to get Parent of textbox. its always returns me the handle of Form not the panel.

Is there any way to get the Parent Control of a control on the Form?
Am I missing anything?

Thanks

dinoo
 
H

Herfried K. Wagner [MVP]

* "=?Utf-8?B?ZGlub28=?= said:
I have a windows form.I added Panel to a windows form.
I put a textbox in a Panel.

When ever I try to get Parent of textbox. its always returns me the handle of Form not the panel.

Is there any way to get the Parent Control of a control on the Form?
Am I missing anything?

Are you sure you placed the textbox inside the panel and not only in
front of the container?
 

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