Results 1 to 3 of 3

Thread: popup list selection

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jul 2005
    Location
    England
    Posts
    79

    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.

  2. #2
    New Member
    Join Date
    Jun 2005
    Posts
    2

    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!

  3. #3
    Frenzied Member ntg's Avatar
    Join Date
    Sep 2004
    Posts
    1,449

    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.
    "Feel the force...read the source..."
    Utilities: POPFileDebugViewProcess ExplorerWiresharkKeePassUltraVNCPic2Ascii
    .Net tools & open source: DotNetNukelog4NetCLRProfiler
    My open source projects: Thales SimulatorEFT CalculatorSystem Info ReporterVSS2SVNIBAN Functions
    Customer quote: "If the server has a RAID array, why should we bother with backups?"
    Programmer quote: "I never comment my code. Something that is hard to write should be impossible to comprehend."
    Ignorant quote: "I have no respect for universities, as they teach not practicle stuff, and charge money for"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width