Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Tooltip on a Usercontrol shows up behind the form

Status
Not open for further replies.

bajdev

Programmer
Aug 15, 2005
13
0
0
US
I have a custom usercontrol that holds several labels and buttons. My usercontrol also contains a tooltip control. If I can set tooltips for the buttons on my usercontrol without any trouble.

The problem occurs when I place my usercontrol on a form and mouse over a button. The tooltips show up behind the form my usercontrol is on. It took me a while to realize this was happening. I ended up placing a really long string in the tooltip and noticed the tip sticking out from behind the forum.

I tried placing a tooltip control on my main form and passing it to my usercontrols constructor when I create the control. While this wasn't pretty I figured I'd just try it. I still get the same behavior though. Even using the tooltip control from the main form the tooltips still show up behind my form.

I had the tooltips working fine when I just had the buttons and tooltip control on my forum. I'd really like to use a usercontrol though.

I thought maybe there was some kind of Z order property or something, but I couldn't find anything.

Does anyone have any ideas?

Thanks in advance,
bajdev
 
You might have to set the Parent property of the tooltip?

Set the parent to the usercontrol.parent
 
Thanks for your response.

Glancing on MSDN it doesn't look like a tooltop object has a parent property.

I see where you are going with it though. You might have me on the right track. I hope so. I'll try anything at this point.

I'm stumped and this is driving me crazy.

I'll try this, this evening and let you know the results.

Thanks again.
bajdev
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top