New topic: 

listbox select multiple - right click action for all items

<http://forums.realsoftware.com/viewtopic.php?t=10740>

       Page 1 of 1
   [ 10 posts ]                 Previous topic | Next topic         Author  
Message       pentium10           Post subject: listbox select multiple - right 
click action for all itemsPosted: Tue Jan 23, 2007 6:02 am                      
         
Joined: Tue Jan 03, 2006 10:38 am
Posts: 523              Hello, 
 
I want to be able do a right click action for all selected items in the 
situation where listbox has selected more than one row. 
Eg: I select 10 visits, and than right click and Invoice 
 
When I do that, only the current item gets invoiced, from 10 selected items 
only 1 remains selected. 
 
Any workarounds? 
(I would not like to put a button on the screen.) 
 
Pentium10   
                            Top               Mike Bailey           Post 
subject: Posted: Tue Jan 23, 2007 8:18 am                               
Joined: Wed Sep 28, 2005 8:30 am
Posts: 5424
Location: Austin, TX              The ConstructContextualMenu event fires after 
the MouseDown event and the MouseDown event is deselecting the rows.  Two 
possible solutions are to log the selected rows and then restore the selection 
in the ConstructContextualMenu event, or you could create the menu in another 
event like MouseDown when appropriate. 
 
Hope this helps.   
                            Top                Jym           Post subject: 
Posted: Tue Jan 23, 2007 12:38 pm                        
Joined: Sat Oct 01, 2005 5:19 pm
Posts: 2099              CellCheck could work for you as well     
_________________
------------------------------------------ 
http://realbasicstuff.googlepages.com 
latest class : Graph Maker 
Thanks to all of you who have been clicking the google Ads even if the subject 
doesn't interest you.  
                            Top               jack           Post subject: Re: 
listbox select multiple - right click action for all itePosted: Tue Jan 23, 
2007 2:47 pm                        
Joined: Sat Oct 01, 2005 6:52 pm
Posts: 1024              pentium10 wrote:... from 10 selected items only 1 
remains selected.
Any workarounds?
Pentium10 
 
Yes, you can drag  a ContextualMenu object onto your window and use it to 
display a menu and Return True in MouseDown after checking for IsCmmClick. 
Selected rows will stay selected. For example: 
 
Code:
If IsCMMClick then
  self.ContextualMenu1.Open
  Return True
End

 
 
- Jack   
                            Top                pentium10           Post 
subject: Posted: Tue Jan 23, 2007 2:48 pm                               
Joined: Tue Jan 03, 2006 10:38 am
Posts: 523              thank you   
                            Top               pentium10           Post subject: 
Re: listbox select multiple - right click action for all itemsPosted: Fri Aug 
21, 2009 3:30 am                               
Joined: Tue Jan 03, 2006 10:38 am
Posts: 523              Currently I popup contextualmenu in MouseDown. It's 
working great with mouse.
But some clients reported they can't use the hardware keyboard button for 
contextual menu (Windows) to raise the menu. Do you know how can this be fixed? 
  
                            Top               computerfreaker           Post 
subject: Re: listbox select multiple - right click action for all itemsPosted: 
Fri Aug 21, 2009 8:49 am                               
Joined: Thu Mar 05, 2009 1:03 pm
Posts: 1415
Location: USA              Try the CreateContextualMenu event - the keyboard 
keypress (logically) won't trip the MouseDown...      
_________________
With great power comes great responsibility.
Learn something new every day, and the rest will take care of itself.
Life is a journey, not a destination. Enjoy the trip!   
                            Top                pentium10           Post 
subject: Re: listbox select multiple - right click action for all itemsPosted: 
Fri Aug 21, 2009 8:58 am                               
Joined: Tue Jan 03, 2006 10:38 am
Posts: 523              where is that event?
I'm using 2009 r2.1   
                            Top               computerfreaker           Post 
subject: Re: listbox select multiple - right click action for all itemsPosted: 
Fri Aug 21, 2009 9:46 am                               
Joined: Thu Mar 05, 2009 1:03 pm
Posts: 1415
Location: USA              Sorry, my bad... it's ConstructContextualMenu...     
 
_________________
With great power comes great responsibility.
Learn something new every day, and the rest will take care of itself.
Life is a journey, not a destination. Enjoy the trip!   
                            Top                pentium10           Post 
subject: Re: listbox select multiple - right click action for all itemsPosted: 
Fri Aug 21, 2009 10:05 am                               
Joined: Tue Jan 03, 2006 10:38 am
Posts: 523              Oh, unfortunately that doesn't work out.
My initial post was to find an alternative way to popup contextual menu for 
multiple selected rows (eg: allow multiple delete). And that doesn't work out 
when menu is raised in ConstructContextualMenu, it works only when raised in 
other event.   
                            Top           Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 10 posts ]     
-- 
Over 1500 classes with 29000 functions in one REALbasic plug-in collection. 
The Monkeybread Software Realbasic Plugin v9.3. 
http://www.monkeybreadsoftware.de/realbasic/plugins.shtml

[email protected]

Reply via email to