Menu

Tooltip not working

Anonymous
2019-01-15
2019-01-17
  • Anonymous

    Anonymous - 2019-01-15

    Hi all,
    Are tooltips working for you?
    If I enter tooltiptext and generate the program, I find some tcl code or labels in my python code.
    When trying to run the code, an error is generated.

    Here is an example.

      51 
      52 def set ::vTcl::balloon::%W {This is a buttons}():
      53     print('EddysPageTest2_support.set ::vTcl::balloon::%W {This is a button}')
      54     sys.stdout.flush()
    
     
  • Anonymous

    Anonymous - 2019-01-15

    Forgot to log in when posting above message. Sorry ...
    Kind regards
    Eddy

     
  • Don Rozenberg

    Don Rozenberg - 2019-01-15

    It's a bug; PAGE does not support balloon help. I have alway felt that that function wasn't as important as the other stuff I was looking at.
    Look for a new version removing tooltip text from the attribute editor.
    Thanks for reporting the problem,
    Don

     
  • Greg Walters

    Greg Walters - 2019-01-16

    I have a small class that implements Tooltips outside of Page. I will post a link to it tomorrow ( 1/17/2019).

     
  • Greg Walters

    Greg Walters - 2019-01-17

    I got done earlier. An entire project can be found at my github page...
    https://github.com/thedesignatedgeek/Page_Splash_and_Tooltips/

     
  • EDDYVE

    EDDYVE - 2019-01-17

    Greg, many thanks for sharing your code.
    I will give it a try.

    Kind regards
    Eddy

     
  • Greg Walters

    Greg Walters - 2019-01-17

    @Eddy, Please let me know how it goes for you.
    Greg

     
  • EDDYVE

    EDDYVE - 2019-01-17

    Greg, your tooltip (and splash screen) code works like a charm.
    And as simple to use as it gets.
    Thanks a lot!
    I tested, not from PAGE because your Main.py program already does that, but with a minimal Tkinter based program.
    Kind regards
    Eddy

    # ======================================================
    # Small program to test the tooltip code
    # of Greg D. Walters. Download from:
    # https://github.com/thedesignatedgeek/Page_Splash_and_Tooltips/
    # ======================================================
    
    from tkinter import *
    from tooltip import ToolTip
    
    def var_states():
       print("male: %d,\nfemale: %d" % (var1.get(), var2.get()))
    
    master = Tk()
    
    Label(master, text="Male/Female:").grid(row=0, sticky=W)
    
    var1 = IntVar()
    CB1 = Checkbutton(master, text="male", variable=var1)
    CB1.grid(row=1, sticky=W)
    ToolTip(CB1, msg='Male', follow=True, delay=0.1)
    
    var2 = IntVar()
    CB2 = Checkbutton(master, text="female", variable=var2)
    CB2.grid(row=2, sticky=W)
    ToolTip(CB2, msg='Female', follow=True, delay=0.1)
    
    Butt1 = Button(master, text='Quit', command=master.destroy)
    Butt1.grid(row=3, sticky=W, pady=4)
    ToolTip(Butt1, msg='Click to exit program', follow=False, delay=0.1)
    
    Butt2 = Button(master, text='Show', command=var_states)
    Butt2.grid(row=4, sticky=W, pady=4)
    ToolTip(Butt2, msg='Click to show values', follow=True, delay=0.1)
    
    mainloop()
    
     
  • Greg Walters

    Greg Walters - 2019-01-17

    Glad it was of help!

     

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.