1

I want to add a tooltip which pops up (at the position of the curser) by mouse hovering over the specific entry in a menubar.

I am using Windows, gwidgets with RGtk2 and R version 3.0.3

My code looks like this:

PG_top  <- gwindow(...)     

action_list = list (  
  open = gaction(label = "Open...", tooltip = "Open a File", icon = "open", handler = openDialogHandler, parent = PG_top)
)

menu_bar_list <- list(File = list (
  Open = action_list$open
  )
)

menu_bar <- gmenu(menu_bar_list, cont=PG_top)

I get no error messages nor any tooltip. Is this a toolkit Problem? I found a Handler called "addHandlerMouseMotion" but I don't know if this works for my kind of problem and what to do inside this Handler. If I try

tooltip<-(action_list[["open"]],"Open File")

or

tooltip<-(action_list$open,"Open File")

I get the errormessage: Error in (...): unexpected ","

Hope you can help me!

  • Sorry, can't get that working. The action is associated with the menuitem via the interface `gtkActivatableSetRelatedAction` which seems like it should set the tooltip. However, I can't set it directly either through the `setTooltipText` method. Any suggestions would be most welcome. – jverzani Apr 25 '14 at 01:01
  • Can you give me any example where a tooltip in a menubar works? Perhaps it's an issue with the lists.. – IndianaJane Apr 27 '14 at 20:22
  • No, I can't. Sorry. If someone could, it would really help me figure out what is not working. I've tried what seemed the likely way to do this, but it is failing. – jverzani Apr 27 '14 at 20:41

0 Answers0