New topic: 

Contextual Menu in ListBox

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

         Page 1 of 1
   [ 1 post ]                 Previous topic | Next topic          Author  
Message        RicSum          Post subject: Contextual Menu in ListBoxPosted: 
Sun Feb 24, 2013 6:46 am                         
Joined: Fri Jun 05, 2009 4:54 pm
Posts: 396
Location: London, England                Hi,
could someone please help me with the following problem:

I have a contextual menu for my ListBox, which gives the user the choice to 
edit the selected row, or to delete it.
If a user clicks on an EMPTY row and selects "Edit This Row" - there is no row 
to edit !!!

Therefore, is it possible to limit the contextual menu to only rows which 
contain data?

My code is listed below:


// Inserted into ConstructContextualMenu of ListBox  

base.append(New MenuItem("Edit This Row"))
base.append(New MenuItem(MenuItem.TextSeparator))
base.append(New MenuItem("Delete This Row"))

Return True  //display the contextual menu



// Inserted into ContextualMenuAction of ListBox

Select Case hititem.text
case "Edit This Row"
  win_Edit.show
case "Delete This Row"
  MsgBox "You chose delete"
End select

Return True



Thank you all in advance.      
_________________
RealStudio Professional Edition 2011 Release 4 & 2012 Release 1.2
Developing on OS X  10.8 (Mountain Lion)
Deploying on Windows XP / 7 / 8  
                             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 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