I'm trying to make a VS-like auto-complete control and can't figure out how to display it so it isn't clipped by the main Form. In VS, it looks like that: (as you can see, the auto-complete list is not clipped by the border of the VS main form)
I tried to put my selection list into a control which got me that far:
Does anyone have an idea how to get a control shown over the bounds of the form? Sadly, taking another form to put it in is not an option since the thing has to be visible while the focus is on the TextBox.
To position the form, you need get the control you want the form to appear near, and use Control.PointToScreen to get the screen coords and position the form with an offset.
Yup, that did the trick. Thanks!
Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.