Results 1 to 11 of 11

Thread: selecting items from a listbox

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Mar 2007
    Posts
    200

    selecting items from a listbox

    ok, u usually select an item from a listbox through a mouse-rightclick
    Select = just click on it and it turns highlighted

    i want to select an item with left click, is it possible?

    Thanks v much for the help =D

  2. #2
    Member
    Join Date
    Jun 2007
    Location
    South Africa > Gauteng > Pretoria
    Posts
    42

    Re: selecting items from a listbox

    I hope this is helpful. I am also working with listboxes at the moment and I cannot select items with a right click only with a left click. So I think it is possible to select an item from a listbox with a left click on your mouse.

  3. #3
    Hyperactive Member NPassero's Avatar
    Join Date
    May 2007
    Location
    NJ
    Posts
    272

    Re: selecting items from a listbox

    Quote Originally Posted by Zapper
    ok, u usually select an item from a listbox through a mouse-rightclick
    Select = just click on it and it turns highlighted

    i want to select an item with left click, is it possible?

    Thanks v much for the help =D
    believe you got your right and left mixed up. ( L | R )

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Mar 2007
    Posts
    200

    Re: selecting items from a listbox

    yea i did get it mixed up, so now, how to select using left click?

  5. #5
    Member
    Join Date
    Jun 2007
    Location
    South Africa > Gauteng > Pretoria
    Posts
    42

    Re: selecting items from a listbox

    Hi

    I've set my selectionmode for the listbox to multiselect. So I just click on a few items, using the left mouse button and the selected items gets highlighted. Do you by any chance know how to add the selected items to a database(Access) table?

  6. #6
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: selecting items from a listbox

    I think you may be dyslexic as it looks like you've still got them mixed up. You normally select with a LEFT click. If you want to select with a RIGHT click the do as follows:

    Handle the MouseClick event.
    Determine which button was clicked and where from the 'e' parameter.
    Call the IndexFromPoint method to get the index of the item that was clicked.
    Call the SetSelected method to select the item at that index.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  7. #7
    Member
    Join Date
    Jun 2007
    Location
    South Africa > Gauteng > Pretoria
    Posts
    42

    Thumbs down Re: selecting items from a listbox

    I really don't need you to insult me, I'm telling you what's happening when I click left. Okay, now I can't seem to select anything when I right click items in the listbox and I can definitely destinguish between (L | R) for your info. If you can't seem to believe that, it's your problem. I'm quite happy with selecting items with the left click and so is my manager, He knows the language and if there was something wrong with selecting items with a left click I'm sure he would've told me. In the future I'll ask him for help. At least he doesn't judge people, and nothing gives you the right to judge either.

  8. #8
    Interweb adm/o/distrator Paul M's Avatar
    Join Date
    Nov 2006
    Location
    Australia, Melbourne
    Posts
    2,306

    Re: selecting items from a listbox

    He was talking to Zapper i believe.

  9. #9
    Member
    Join Date
    Jun 2007
    Location
    South Africa > Gauteng > Pretoria
    Posts
    42

    Exclamation Re: selecting items from a listbox

    Sorry just got a little upset.

  10. #10
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: selecting items from a listbox

    I was talking to Zapper. Sorry, should have quoted this:
    Quote Originally Posted by Zapper
    yea i did get it mixed up, so now, how to select using left click?
    An admission that the first question was the wrong way around and then a repeat of the same question. Should have also included a .
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  11. #11
    Member
    Join Date
    Jun 2007
    Location
    South Africa > Gauteng > Pretoria
    Posts
    42

    Smile Re: selecting items from a listbox

    That's ok, I was just confused and felt a little anger when I saw the word
    "dyslexic".

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