Re: Win32Lib: listbox: select item with RIGHT mouse click?
I don't think there's any automatic way to do this. You'd have to trap the
right click, do a hit test and select the item, if any. There are built in
functions for Listviews and Treeviews, but I think you'd have to do this
manually for a regular list box. You'd want to use a combination of
LB_GETITEMRECT and LB_GETTOPINDEX for the hit testing, to get the
information on what the first visible item is in the list box, and then the
size of the items...
Matt Lewis
> -----Original Message-----
> From: Dan B Moyer
>
> When you LEFT click on an item in a listbox, it gets
> selected, and you can
> use getIndex to tell you which item was selected, and cause an action
> relative to that item with a left double-click (which can be
> done in one
> motion: move cursor to item, then double-click); but I'd also
> like to make
> something happen if an item is RIGHT clicked, but it seems I
> have to select
> the item first with a left click, and then do a right click.
>
> Is there a way to cause a right click alone to select an item
> in a list and
> thence be able to act with regard to that item?
>
> Dan
>
|
Not Categorized, Please Help
|
|