|
-
Jul 26th, 2005, 09:50 AM
#1
Thread Starter
Lively Member
popup list selection
What code do I use to make a little form popup, above my main form, which the user has to select 1 item from a listbox, which will be generated from a CSV file.
Anyone able to help me out?
Cheers.
-
Jul 26th, 2005, 10:41 AM
#2
New Member
Re: popup list selection
Sorry to blatently hijack this thread, but I'm looking for answers to pretty much the same question (and I might just be able to help - two minds better than one, and all that...)
(Background for my case: I want an auto-complete popup, just like the auto-complete thing you get in the VB IDE, to appear over a rich-text box, essentially making a user control very similar to the Immediate window in the .NET IDE.)
So far (and this might answer your question, Cyber-Drugs), I've got a TreeView populated with the items that I want in my popup which I hide or show, and set the location according to where the caret is in the textbox, then I handle keypress events, to select the item in the tree that's closest to the text that the user has entered. Initially this was absolutely fine for me, so as I say, perhaps this is a good enough solution for you...?
The problem I have (which may well be the same for Cyber-Drugs) is that I have my rich-text box filling a (fairly small) user control, and the TreeView is parented to the rich-text box, which means that if the TreeView is popping up at the top of the user control, (so the top of the TreeView is above the top of the user control), I lose the top of the TreeView. Is there any easy (or not so easy) way to force that TreeView to be on top of everything? The other thought I had was to put the TreeView in a context menu, and somehow fire that when I want to see the popup? Is that better/possible/stupid? Any other suggestions?
Again, I apologise for hijacking, but I figured that answers would be similar - if I cause any outrage, then moderators, please feel free to delete my post!
-
Jul 26th, 2005, 10:57 AM
#3
Re: popup list selection
Cuber-Drugs...sounds like all you need to do is make a simple form with a listbox and then show it.
Why don't you guys try searching at GotDotNet? They have ready-made controls in the user samples that can do what you're trying to achieve.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|