473,241 Members | 1,612 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,241 software developers and data experts.

Can i have "OnMouseEnter" in the menu?

Elias Alhanatis
Hello everybody ,
I have the following piece of code ( please dont pay any attention to the Greek... :-) ) , and i would like to know if there is a way to make the menu under each MenuButton appear only by entering its space with the mouse ( and thus saving some million clicks from the users....). I think i've seen this kind of thing elsewhere but i cannot remember exactly.

Thanks in advance!!!!!!

Elias

Expand|Select|Wrap|Line Numbers
  1. # -*- coding: cp1253 -*-
  2. from Tkinter import *
  3.  
  4.  
  5. def MeFr():
  6.     mefr=Frame(root,height="0.8c",width="30c",bg="cyan")
  7.     mefr.grid()
  8.  
  9. # Το μενού "Αρχεία":
  10.  
  11.     ArxiaBut=Menubutton(mefr, text=u"Αρχεία", relief=RAISED, activebackground="blue" ,activeforeground="white")
  12.     ArxiaBut.menu=Menu(ArxiaBut,tearoff=0)
  13.     Arxia=[u"1. Αποθήκη",
  14.            u"2. Πελάτες",
  15.            u"3. Προμηθευτές",
  16.            u"4. Πωλητές",
  17.            u"5. Λογαριασμοί",
  18.            u"6. Ταμείο - Συνάλλαγμα"]
  19.     for text in Arxia:
  20.         ArxiaBut.menu.add_command(label=text)
  21.     for sep in [1,5]:
  22.         ArxiaBut.menu.insert_separator(sep)
  23.     ArxiaBut.grid(row=0,column=0,sticky=W)
  24.     ArxiaBut['menu']=ArxiaBut.menu
  25.  
  26.  
  27. # Το μενού "Κινήσεις":
  28.  
  29.     KiniseisBut=Menubutton(mefr, text="Edit", relief=RAISED, activebackground="blue", activeforeground="white")
  30.     KiniseisBut.menu=Menu(KiniseisBut,tearoff=0)
  31.     kiniseis=[u"1.  Πωλήσεις",
  32.               u"2.  Αγορές",
  33.               u"3.  Παραγωγή Ετοίμων",
  34.               u"4.  Παρακολούθηση Παραγωγής",
  35.               u"5.  Ενδοδιακίνηση μεταξύ Αποθηκών",
  36.               u"6.  Εισπράξεις από πελάτες",
  37.               u"7.  Πληρωμές σε Προμηθευτές",
  38.               u"8.  Κινήσεις Λογαριασμών",
  39.               u"9.  Επιταγές - Γραμμάτια",
  40.               u"10. Πιστωτικές Κάρτες",
  41.               u"11. Μαζικές Κινήσεις",
  42.               u"12. Διάφορες Κινήσεις Αποθήκης"]
  43.     for text in kiniseis:
  44.         KiniseisBut.menu.add_command(label=text)
  45.     for sep in [5,8,11,13]:
  46.         KiniseisBut.menu.insert_separator(sep)
  47.     KiniseisBut.grid(row=0,column=1,sticky=W)
  48.     KiniseisBut['menu']=KiniseisBut.menu
  49.  
  50.  
  51.  
  52.  
  53. root=Tk()
  54. MeFr()
  55. mainloop()
Sep 23 '07 #1
0 1075

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: kaeli | last post by:
All, I've been unable to find out if javascript supports for (var e in obj) type of looping syntax. Does it? If so, is this for DOM browsers only? TIA! --
0
by: lisseut | last post by:
Hi, hope I'm posting to the right forum. I'm using C# under .NET 1.1, Windows XP SP2 I have a form and I've overridden WndProc to print to a text box whenever it receives the WM_NCMOUSELEAVE...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.