I'm having trouble with using the <Keyevent with the Text object.
When I use them together (which is a logical combination), I use this
code:
textbox = Text(root, wrap="word", height=15, width=50)
textbox.bind("<Key>", resolveGlyphs)
def resolveGlyphs(event):
textBuf = textbox.get(1.0, END)
print(textBuf)
What it prints out for me is everything except for the last character
-- the one that triggered the event. How can I get the entire
contents?
I apologize if this has already been discussed. I searched and
couldn't find it. 3 2100
On Wed, 2006-09-06 at 17:54 -0700, Jay wrote:
I'm having trouble with using the <Keyevent with the Text object.
When I use them together (which is a logical combination), I use this
code:
textbox = Text(root, wrap="word", height=15, width=50)
textbox.bind("<Key>", resolveGlyphs)
def resolveGlyphs(event):
textBuf = textbox.get(1.0, END)
print(textBuf)
What it prints out for me is everything except for the last character
-- the one that triggered the event. How can I get the entire
contents?
bind the textbox to the <KeyReleaseevent because by then it has been
drawn on the Text widget. The <Keyevent is equivalent to the
<KeyPressevent
Regards,
John
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
That makes sense, but it's not working.
John McMonagle wrote:
On Wed, 2006-09-06 at 17:54 -0700, Jay wrote:
I'm having trouble with using the <Keyevent with the Text object.
When I use them together (which is a logical combination), I use this
code:
textbox = Text(root, wrap="word", height=15, width=50)
textbox.bind("<Key>", resolveGlyphs)
def resolveGlyphs(event):
textBuf = textbox.get(1.0, END)
print(textBuf)
What it prints out for me is everything except for the last character
-- the one that triggered the event. How can I get the entire
contents?
bind the textbox to the <KeyReleaseevent because by then it has been
drawn on the Text widget. The <Keyevent is equivalent to the
<KeyPressevent
Regards,
John
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Nevermind. It works. Sorry. I got my files mixed up! :-)
John McMonagle wrote:
On Wed, 2006-09-06 at 17:54 -0700, Jay wrote:
I'm having trouble with using the <Keyevent with the Text object.
When I use them together (which is a logical combination), I use this
code:
textbox = Text(root, wrap="word", height=15, width=50)
textbox.bind("<Key>", resolveGlyphs)
def resolveGlyphs(event):
textBuf = textbox.get(1.0, END)
print(textBuf)
What it prints out for me is everything except for the last character
-- the one that triggered the event. How can I get the entire
contents?
bind the textbox to the <KeyReleaseevent because by then it has been
drawn on the Text widget. The <Keyevent is equivalent to the
<KeyPressevent
Regards,
John
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: wang xiaoyu |
last post by:
Hello,everyone.
my program runs well in windows,i use tkSimpleDialog to receive some
input,but when i copy my program into Linux RH8.0,entrys in my
tkSimpleDialog derived Dialog have a vital...
|
by: Raghul |
last post by:
hi,
I am developing a jabber client.What I need is whrn i enter text in
the text area and when I press return key. The following text should be
send.I found the way to send the message, the only...
|
by: Markus Seibold |
last post by:
Hello NG,
sorry for pasting that much code but I just can't figure out how get the
<key><keyref> to work in XML Schema. I am using XMLSpy 4.3 for editing my
XML. I want to represent a...
|
by: I am dog |
last post by:
Hi ,
I use VS 2005 beta1 to do some thing as follows.
declare a Dictionary<ulong,DelegateTyep> dictionary = new ...
and use dictionary object such as
dictionary += aDelegateTyepObject;
|
by: Keith |
last post by:
Hi,
I created a dataset during run time and assigned it to the datagrid.
But i cant get the FindBy<Key> method to work. During design time, i
got a error "dtProdHdr is not a member of...
| |
by: KatB |
last post by:
I have an aspx page with a button on it (Button1), and a ascx control
with a text field and a button (Button2). When I click Button2, Button1
fires. Since ascx doesn't allow <form> tags, I can't...
|
by: pankajkmeena |
last post by:
is it possible to capture control+alt+<any key> in PHP
|
by: pankajkmeena |
last post by:
is it possible to capture control+alt+<any key> in javascript
|
by: dmjpro |
last post by:
Actually what i am trying to do that is to search some data as per users' entries.
Firstly i am fetching the whole data from the database and keeping in a hidden table then as user gives the search...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |