Results 1 to 3 of 3

Thread: [RESOLVED] Messagebox containing a listbox

  1. #1

    Thread Starter
    Hyperactive Member Mallard8's Avatar
    Join Date
    Feb 2018
    Location
    Wales
    Posts
    284

    Resolved [RESOLVED] Messagebox containing a listbox

    Is it possible to have a message box popup but instead of containing a textbox have it contain a list box, still with OK and cancel buttons.

  2. #2
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,745

    Re: Messagebox containing a listbox

    No, the MessageBox only does what it does... whenever you want extra functionality, it is quicker to create your own than attempt to find a way to get the MessageBox to do something extra (which is sometimes possible, but very complicated).

    It is very easy to create your own form that has the controls you want, and in order to get it to behave modally (make the calling code wait until it closes) just display it using ShowDialog. In order to return a value (like the OK/Cancel) you can use the DialogResult property.

  3. #3

    Thread Starter
    Hyperactive Member Mallard8's Avatar
    Join Date
    Feb 2018
    Location
    Wales
    Posts
    284

    Re: Messagebox containing a listbox

    Thanks Si,
    Will go and have a look at a couple of tutorials on what you have suggested.
    See what i can come up with.

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