Results 1 to 5 of 5

Thread: using mouse with listview

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Mar 2000
    Posts
    168
    hello.. can anyone show me how to utilize the right click to make a popup menu in listview? and is there a way to make it so you can drag and drop a row in the listview to rearrange manually?

    thanks!
    Thai

  2. #2
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    In the mousedown event use popupmenu method with a menu that you contruct in the menu editor by pressing Ctrl+E. To make it popup under rightclick, the button argument needs to be 2.
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Mar 2000
    Posts
    168
    yeah i got that part down, but i need to trap it where it enables and disables the contents in the popupmenu depending on WHERE the mouse is clicked.. if its clicked on an item, or in a blank space where there is no item.. how would I do that?

    Thanks,
    Thai

  4. #4
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    is there a nodeclick event in listview? or something thats simliar it in treeview? Then put your code there, and put the mousedown: button into listviews tag so that u can get it from the nodeclickevent.

    Or you can use the hittest(x,y) method of mousedown to get the node you're clicking on
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  5. #5
    Conquistador
    Join Date
    Dec 1999
    Location
    Australia
    Posts
    4,527
    I think you can also check for the selected item ???

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