> billpo
@alum.mit.edu wrote:
> > I am trying to get tooltips on menu items using the tklib tooltip
> > package. In this I have been unsuccessful - nothing shows up.
> > I see that this issue was discussed here before:
> >
http://groups.google.com/group/comp.lang.tcl/browse_thread/thread/2f7...
> > As I understand it, the upshot of that it should work. The problem
> > referred to in that thread is on MS Windows. I am using Linux. So, do
> > tooltips work on menu items? Here is an example, based on the previous
> > thread:
> > package require Tk
> > package require tooltip
> > label .l -text "Label"
> > pack .l
> > tooltip::tooltip .l "Some 'tooltip' help"
> > set mb [menu .mb]
> > set m [menu $mb.file]
> > . config -menu $mb
> > $mb add cascade -label "File" -menu $m
> > $m add command -label "Save" -command {file_save}
> > tooltip::tooltip $m -index 1 "Save buffer contents"
> > The tooltip appears as intended over the label "Label", but not over
> > the "Save" item, either in situ or when torn off.
> The following works for me on unix:
> package require Tk
> package require tooltip
> label .l -text "Label"
> pack .l
> tooltip::tooltip .l "Some 'tooltip' help"
> menubutton .file -text "File" -menu .file.m -underline 0
> tooltip::tooltip .file "File menu"
> pack .file
> menu .file.m -tearoff 0
> .file.m add command -label "Open"
> tooltip::tooltip .file.m -index 0 "Open file"
> .file.m add command -label "Save"
> tooltip::tooltip .file.m -index 1 "Save file"
> Hope that helps
> Ivan...
This works for me too. Thanks. Now why the one way doesn't work and