Hi,

REALbasic 2006 Release 3 Commercial Professional for Mac OS X (10.4.7)
REALbasic 2006 Release 3 Commercial Standard for Windows (XP SPII)
REALbasic 2006 Release 3 Standard for Linux (suse 10.1)

I am trying to work with ContextualMenu on an HTMLViewer Control.

Since I cannot make it works, I go to the Language Reference (the html embedded one) and search, search, search...


The RectControl Class - parent of the HTMLViewer Control - have an example under [Notes --> Handling Contextual Menus] that I simply Copy / Paste in the Window Event Handlers:


Function ConstructContextualMenu(base as MenuItem, x as Integer, y as Integer) As Boolean
 Dim m1 as New MenuItem
 Dim m2 as New MenuItem

 m1.Text="Import"
 m2.text="Export"

 base.append m1
 base.append m2

 Return True//display the contextual menu
End Function

And:

Function ContextualMenuAction(hitItem as MenuItem) As Boolean
 Select Case hititem.text
 case "Import"
   MsgBox "You chose Import"
 case "Export"
   MsgBox "You chose export"
 End select

 Return True
End Function


And that works fine when I Ctrl-Click in the window part (not above the HTMLViewer Control, but I knew that).

Then, I moved the code to the appropriate (same) events in the HTMLViewer Control, but nothing happens...

Is someone in this list who knows why, where I am wrong and how I can do it the right way ?
[If so, please, express yourself here and now :) ]

TIA,

Emile
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to