I'm starting to write a POS application UI's module.
There's no mouse, just a bunch of global shortcuts.
the problem is that TK doesn't have global shortcuts! Is there a
work-around or i will have to attach 80 or so bindings for every input
element?
Thanks,
Gabriel 3 1322
Gabriel B. wrote: I'm starting to write a POS application UI's module.
There's no mouse, just a bunch of global shortcuts.
the problem is that TK doesn't have global shortcuts! Is there a work-around or i will have to attach 80 or so bindings for every input element?
In Tk here are three levels of binding: instance binding, class binding,
and application binding represented by the bind, bind_class, and
bind_all methods. You're probably looking for the the bind_all method,
as in self.bind_all("<SomeKey>", self.onSomeKey)
HTH,
--
Vincent Wehren Thanks, Gabriel
vincent wehren wrote: Gabriel B. wrote:
I'm starting to write a POS application UI's module. In Tk here are three levels of binding: instance binding, class binding, and application binding represented by the bind, bind_class, and bind_all methods. You're probably looking for the the bind_all method, as in self.bind_all("<SomeKey>", self.onSomeKey)
HTH, -- Vincent Wehren
Oh and you of course __must__ look at the (recently updated!) New Mexico
Tech tkinter document at: http://infohost.nmt.edu/tcc/help/pubs/tkinter.pdf
See page 75 and follwing for more info on keyboard bindings...
--
Vincent Wehren Thanks, Gabriel
> Oh and you of course __must__ look at the (recently updated!) New Mexico Tech tkinter document at: http://infohost.nmt.edu/tcc/help/pubs/tkinter.pdf
See page 75 and follwing for more info on keyboard bindings...
Thanks, i was looking down that doc because the first thing i looked
into it was the pack method and it talked about the grid only
....i'm still using "practical programing in Tcl and Tk" for my tk needs :)
thanks again,
Gabriel This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Krisztian Kepes |
last post by:
Hi !
I want to create an module and I want to use some Global Constant in it.
How to I create an global constant in module what is accessable in from other modules ?
like this example:
***...
|
by: beliavsky |
last post by:
How can I pass global data to function stored in a separate file?
For example, in file "funk.py" is the code
ipow = 2
def xpow(xx): return xx**ipow
and in "xfunk.py" is the code
from funk...
|
by: Brian Leair |
last post by:
I am using "from MyModule import *", (yes, yes, I know)
MyModule has a variable "g_my_var" at the "global" scope.
In the code that performs the import, I have a function that has the
statement...
|
by: Arthur Chereau |
last post by:
Hi,
I'm trying to setup viewcvs to work with subversion 1.2.0 on Linux with
Python 2.4.1. The last viewcvs (from CVS) needs subversion python
bindings. I installed swig and built subversion from...
|
by: seberino |
last post by:
At top of a module I have an integer like so...
foo = 4
In a function in that module I know I need to do 'global foo' to get at
the value 4.
....
IIRC, for dictionaries you DO NOT have...
|
by: Crutcher |
last post by:
I've been playing with dictionary subtypes for custom environments,
and I encountered a strange interaction between exec, dictionary
subtypes, and global variables. I've attached a test program,...
|
by: yinglcs |
last post by:
Hi,
I have the following code:
colorIndex = 0;
def test():
print colorIndex;
This won't work. But it works if i do this:
|
by: abcd |
last post by:
I have a file, "a.py"
blah = None
def go():
global blah
blah = 5
....i was hoping to see "5" get printed out the second time I displayed
|
by: Jason Yamada-Hanff |
last post by:
Hi all,
I'm working on a project that would benefit very much from Python
Freetype2 bindings (the Fonty Python project). I don't want to
duplicate efforts and wrap the library again if we don't...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
| |