New topic: Listbox Contextual Click
<http://forums.realsoftware.com/viewtopic.php?t=24926> Page 1 of 1 [ 1 post ] Previous topic | Next topic Author Message fitzbew Post subject: Listbox Contextual ClickPosted: Thu Oct 23, 2008 9:32 am Joined: Fri Sep 30, 2005 8:30 am Posts: 215 Using: 2008r4.1, OS X.5.5 (but looking for cross-platform answer): I have several projects that have code like this in the MouseDown event of a Listbox: Code:If IsContextualClick() = True Then ContextualMenu1.Addrow Blah ContextualMenu1.Addrow Blah ContextualMenu1.Open() Return True //Show the contextual menu, but don't process the Listbox MouseDown event any further. Don't //select the Row receiving the MouseDown. Else //Process the MouseDown normally. Return False End If But the ContextualMenu class is being deprecated, so I am moving to the ConstructContextualMenu event in each class. I have found, though, that if I assign the proper code to the Listbox ConstructContextualMenu event, and return True in the Listbox MouseDown event, the ConstructContextualMenu event does not fire. The Window-level ConstructContextualMenu event also does not fire if I return True in the Listbox MouseDown. If I return False, the event does fire but it is also sent on into the Listbox which selects the row being clicked and so on. I would like to show the Contextual menu, without affecting the Listbox. What is the best design for intercepting the Listbox Mousedown, but still show a Contextual menu? Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 1 post ] -- Over 900 classes with 18000 functions in one REALbasic plug-in. The Monkeybread Software Realbasic Plugin v8.1. <http://www.monkeybreadsoftware.de/realbasic/plugins.shtml> [email protected]
