Hello,
I have this in an ImageWell MouseDoen event:
// Make the base item, this is what will be doing the popping up
dim base as new MenuItem
dim f as folderitem
f=GetFolderItem("")
dim i as integer
f = SpecialFolder.Applications
// Add some items
for i = 1 to f.Count
Dim item As folderitem = f.TrueItem(i)
If item.Name.Left(1) = "." or item.DisplayName = "Icon" + chr(13) then
'do not display it
else
base.Append( new MenuItem( item.DisplayName) )
end if
next i
// Add a Separator
base.Append( new MenuItem( MenuItem.TextSeparator ) )
// Add a sub menu
dim submenu as new MenuItem( "SubMenu" )
submenu.Append( new MenuItem( "SubMenu Test 1" ) )
submenu.Append( new MenuItem( "SubMenu Test 2" ) )
submenu.Append( new MenuItem( "SubMenu Test 3" ) )
base.Append( submenu )
// Add a Separator
base.Append( new MenuItem( MenuItem.TextSeparator ) )
// Add an item that's on a menu bar so that you can see you don't
// have to handle every item returned.
base.Append( UntitledItem )
#if TargetMacOS
// becuase of how quitting the app is handled on Mac OS you cannot add the
FileQuit item on OS X
#else
base.Append( FileQuit ()
#endif
// Now display the menu
dim hitItem as MenuItem
hitItem = base.PopUp
if hitItem <> nil then MsgBox hitItem.Text
return true
So when the project is built and launched if I hold the mouse down in the
Imagewell the contents o SpecialFolder.Applications is displayed.
I would like to have their icons(or a picture of their icons) displayed too,
how can I do that?
Thanks.
Lennox.
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>
|