473,668 Members | 2,594 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

wxpython and wxtextctrl

Hello,
my script worked well until today : when I tried to launch it, I got the
following :

frame = MyFrame(None,-1,"Geometrie",s ize=wx.Size(600 ,400))
File "/home/nico/Desktop/wxGeometrie/version 0.73/geometrie.py", line
74, in __init__
self.commande.B ind(wx.EVT_CHAR , self.EvtChar)
AttributeError: wxTextCtrl instance has no attribute 'Bind'

(self.commande is a wxTextCtrl instance)
I don't understand : why did wxTextCtrl lost its Bind attribute ??
As there's not so much changes on my computer since yesterday, I suppose
this is due to Boa package installation on my Ubuntu Hoary ?
Does Boa installation changes wxpython version ?
Is wxTextCtrl attribute .Bind() obsolete ??

Thanks,
Nicolas
Jul 19 '05 #1
2 2270
Nicolas Pourcelot wrote:
Hello,
my script worked well until today : when I tried to launch it, I got the
following :

frame = MyFrame(None,-1,"Geometrie",s ize=wx.Size(600 ,400))
File "/home/nico/Desktop/wxGeometrie/version 0.73/geometrie.py", line
74, in __init__
self.commande.B ind(wx.EVT_CHAR , self.EvtChar)
AttributeError: wxTextCtrl instance has no attribute 'Bind'

(self.commande is a wxTextCtrl instance)
I don't understand : why did wxTextCtrl lost its Bind attribute ??
As there's not so much changes on my computer since yesterday, I suppose
this is due to Boa package installation on my Ubuntu Hoary ?
Does Boa installation changes wxpython version ?
Is wxTextCtrl attribute .Bind() obsolete ??

Thanks,
Nicolas


control.Bind is relativly new. The wxTextCtrl notation (vs wx.TextCtrl) is
the old way (but it IS kept around for backwards compatablility) . My guess
is that your code is for for a newer version of wxPython than what you
actually have.

Try printing the version from in your code:

import wxPyhon
print wxPython.__vers ion__
self.commande.B ind(wx.EVT_CHAR , self.EvtChar)

-greg

Jul 19 '05 #2
Ok, as I guessed, it was Boa installation which changed the wxpython
version used.
I removed Boa...
Thanks !
Nicolas

Greg Krohn a écrit :
Nicolas Pourcelot wrote:
Hello,
my script worked well until today : when I tried to launch it, I got
the following :

frame = MyFrame(None,-1,"Geometrie",s ize=wx.Size(600 ,400))
File "/home/nico/Desktop/wxGeometrie/version 0.73/geometrie.py",
line 74, in __init__
self.commande.B ind(wx.EVT_CHAR , self.EvtChar)
AttributeError: wxTextCtrl instance has no attribute 'Bind'

(self.commande is a wxTextCtrl instance)
I don't understand : why did wxTextCtrl lost its Bind attribute ??
As there's not so much changes on my computer since yesterday, I
suppose this is due to Boa package installation on my Ubuntu Hoary ?
Does Boa installation changes wxpython version ?
Is wxTextCtrl attribute .Bind() obsolete ??

Thanks,
Nicolas

control.Bind is relativly new. The wxTextCtrl notation (vs wx.TextCtrl) is
the old way (but it IS kept around for backwards compatablility) . My guess
is that your code is for for a newer version of wxPython than what you
actually have.

Try printing the version from in your code:

import wxPyhon
print wxPython.__vers ion__
self.commande.B ind(wx.EVT_CHAR , self.EvtChar)

-greg

Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2411
by: newgene | last post by:
Hi, group, I guess it is a simple question for you, but it puzzles me for a while. I use a wxTextCtrl in my application for output result and any exception msg. I know I can add new msg onto wxTextCtrl by WriteText() method. But I have a function imported from another module and in this function all results are output by "print". I am wondering if I can redirect stdout and stderr into the wxTextCtrl object, so that all output from that...
5
4191
by: Daniel Ehrenberg | last post by:
I'm trying to learn wxPython, but I can't seem to find much documentation. The wxPython website says that all advanced (and even some basic) documentation for wxPython is only available in C++ syntax in the main wxWindows documentation. It also says that the samples will help, but I can't seem to make sense of them. Should I just use a not-as-good GUI like Tkinter or a not-as-common one like Anygui or PyUI if I want to have documentation?...
3
3010
by: Logan | last post by:
I asked a similar question already in the wxPython mailing list, but did not get an answer up to now: 1.) When using a TextCtrl with styles (color etc.) in wxPython, is it then possible to get a 'list' (or anything) from the widget which tells you which styles are used in the widget (and where!; 'beginning of style', 'end of style', 'type of style' ...)? 2.) Is it possible to set something like a mark in a TextCtrl?
3
1786
by: hellprout | last post by:
hi , i have a problem with a wxtextctrl with multiline option. i want to write a file , line after line , in my wxtextctrl . But my file is too longer , and the wxtextctrl can't write the end of the file , i miss 100 lines of my file ... What can i do to have all data file ? what library can i use to replace wxtextctrl ? thanks sylvain
0
2161
by: Piet | last post by:
Hello wxPythoneers. I have a problem with a dialog box derived from wxFrame which has a wxComboBox as main element. Depending on the entry selected from the ComboBox, the dialog box will be populated with a number of controls. This works fine for the first selection of a combobox item, but subsequent selections from the combobox cause problems. This is because the event function for the combobox populates the sizer for the window with...
1
2063
by: flupke | last post by:
Hi, i'm trying to convert my java console app to a python gui. Now, the only problem i seem to have at the moment are the resizers for the layout. It seems that for the purpose of what i'm trying to do, specifying the coordinates is easier that fighting with the layout resizers. 1) I have a screen split in 2. Left side is a textcontrol where logging will end up. All text will be appended to the textcontrol. Ideally this should allow...
8
2559
by: Madhan | last post by:
All: I am developing a chat client in python. I want to include smileys in my instant messages. Which component support this? I used wxTextCtrl for both input and output. This chat client runs both in win and linux platform. Any suggestion will be greatly appreciated. Thanks Madhan
3
2545
by: Russ Phillips | last post by:
I'm just starting to learn Python & wxPython. I have a frame named frSend in a file fSend. On this frame is a wxTextCtrl named txtMsg. I have a module named defs.py I would like to get the value of txtMsg from within defs.py I tried the following: BodyText = fSend.frSend.txtMsg.GetValue ()
4
3175
by: kkt49 | last post by:
# vim: et sw=4 ts=8 sts from wxPython.wx import * import sys, os, time import pywintypes import win32serviceutil import win32service import win32event import win32process
0
8371
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8790
jinu1996
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8572
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8652
tracyyun
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5677
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4202
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4372
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2017
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1779
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.