Hi Bob,
The trick is to get the location of your control in respect to the TopLevelControl, and also you have to use a new System.Drawing.Point. So, you need to do something like this:
Control o = this.MyTextBox;
int Top = o.Top;
int Left = o.Left;
while (o.Equals(this.TopLevelControl) == false)
{
Top = Top + o.Top;
Left = Left + o.Left;
o = o.Parent;
}
SearchPopUp.Location = new System.Drawing.Point(Left, Top);
~~Bonnie
>I have a Windows Form, that has a Panel, that has a textbox/button combo on it. When I click the button, I'd like a search window to popup right next to the Textbox. I'm not really sure how to reference the location so that I can achieve this. I've tried the following code in the click event of the button, but it doesn't do seem anything.
>
>SearchPopUp.Location = this.Location;
>
>Any ideas? Thanks!!
>
>bob