Hi all
I am using wxPy 2.6.3.2-2, But when run an application with self.Bind
, I got an error that there is no Bind.
How can I fix it. thanx 8 1677
Jia Lu wrote:
Hi all
I am using wxPy 2.6.3.2-2, But when run an application with self.Bind
, I got an error that there is no Bind.
How can I fix it. thanx
Perhaps you could show us the code that's failing, with the traceback -
even better, use the knowledge you have already gained to write a
*short* program that exhibits the same failure. Then post the code and
the traceback.
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Skype: holdenweb http://holdenweb.blogspot.com
Recent Ramblings http://del.icio.us/steve.holden
Jia Lu schreef:
Hi all
I am using wxPy 2.6.3.2-2, But when run an application with self.Bind
, I got an error that there is no Bind.
How can I fix it. thanx
You can not bind an event to a wx application. You must bind an event
to a wx frame or control. You'll get more and better support on the
wxpython-user mailing list.
Stani
-- http://pythonide.stani.be
Steve Holden のメッセー ジ:
Perhaps you could show us the code that's failing,
the code is :
<code>
#!/usr/bin/python -tt
__author__ = "Jia Lu <ro*****@gmail. com>"
__verstion__ = "1.0.0"
import wx
class MyFrame(wx.Fram e):
def __init__(self):
wx.Frame.__init __(self, None, -1, "MyFrame", size=(300,300))
panel = wx.Panel(self, -1)
panel.Bind(wx.E VT_MOTION, self.OnMove)
wx.StaticText(p anel, -1, "Pos:", pos=(100,105))
self.posCtrl = wx.TextCtrl(pan el, -1, "", pos=(130,100))
def OnMove(self, event):
pos = event.GetPositi on()
self.posCtrl.Se tValue("%s, %s" % (pos.x, pos.y))
if __name__ == "__main__":
app = wx.PySimpleApp( )
frame = MyFrame()
frame.Show(True )
app.MainLoop()
Jia Lu wrote:
Steve Holden のメッセー ジ:
Perhaps you could show us the code that's failing,
the code is :
<code>
#!/usr/bin/python -tt
__author__ = "Jia Lu <ro*****@gmail. com>"
__verstion__ = "1.0.0"
import wx
class MyFrame(wx.Fram e):
def __init__(self):
wx.Frame.__init __(self, None, -1, "MyFrame", size=(300,300))
panel = wx.Panel(self, -1)
panel.Bind(wx.E VT_MOTION, self.OnMove)
wx.StaticText(p anel, -1, "Pos:", pos=(100,105))
self.posCtrl = wx.TextCtrl(pan el, -1, "", pos=(130,100))
def OnMove(self, event):
pos = event.GetPositi on()
self.posCtrl.Se tValue("%s, %s" % (pos.x, pos.y))
if __name__ == "__main__":
app = wx.PySimpleApp( )
frame = MyFrame()
frame.Show(True )
app.MainLoop()
This works perfectly for me, using wxPython 2.6.3.2, on both Linux and
Windows.
What platform are you using?
Frank Millman
Frank Millman のメッセー ジ:
This works perfectly for me, using wxPython 2.6.3.2, on both Linux and
Windows.
What platform are you using?
Yes this works OK for me too on my FedoraCore 5, but cannot work on my
FedoraCore 6...
Jia Lu wrote:
Frank Millman のメッセー ジ:
This works perfectly for me, using wxPython 2.6.3.2, on both Linux and
Windows.
What platform are you using?
Yes this works OK for me too on my FedoraCore 5, but cannot work on my
FedoraCore 6...
Then it is probably an installation problem, which I doubt if I can
help with. However, if you can answer the following questions, someone
else may be able to assist -
1. What is the exact error message?
2. Which version of wxPython are you using?
3. How did you install wxPython - by compiling from source, or by
installing an rpm? I don't think there are any FC6 rpm's available yet.
If you don't get an answer here, ask on the wxPython mailing list - wx************@ lists.wxwidgets .org
Frank
On 29 Oct 2006 22:31:09 -0800, "Jia Lu" <Ro*****@gmail. comwrote:
>Hi all
I am using wxPy 2.6.3.2-2, But when run an application with self.Bind , I got an error that there is no Bind.
How can I fix it. thanx
Is it really an instance of wx.Frame?
What do you get, if you make a "print self" statement?
Franz Steinhaeusler wrote:
Is it really an instance of wx.Frame?
What do you get, if you make a "print self" statement?
sovled it
I think it is an installation problem.
I used yum on FC6 to install wxPython 2.6
But after that I got that error.
Now I uninstalled them and did an installation of wxPy 2.7 manully.
It is ok now.. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: mike420 |
last post by:
Tayss wrote:
>
> app = wxPySimpleApp()
> frame = MainWindow(None, -1, "A window")
> frame.Show(True)
> app.MainLoop()
>
Why do you need a macro for that? Why don't you just write
|
by: Piet |
last post by:
Hello.
I am working on an XML editor that will not display the xml file as
plain text, but will rather work with a combination of a tree view for
the main element nodes and some kind of tabular view to view
attributes. By this way, the user (i.e. me) will only have the
opportunity to change textual contents and attribute values, but
neither element nor attribute names.
Building the tree view was not a problem, but I havent found a good...
|
by: mdk.R |
last post by:
Hello all:
i'am installed wxPython 2.5 and Python2.3.4..i try execute script
with wxPython but it show error:
Traceback (most recent call last):
File "E:\py\test.py", line 7, in ?
import wx
File "E:\py\wx.py", line 10, in ?
from wxPython.wx import *
File "D:\Python23\Lib\site-package
import _wx
|
by: Alex VanderWoude |
last post by:
I am attempting to save my window's size and position when it closes. So I
figured I'd put some code in the __del__() method:
from wxPython import *
class MyWindow(wxFrame):
def __init__(self, parent, id=wxID_ANY, title=None, style=None):
# Some stuff here.
def __del__(self):
x, y = self.GetPositionTuple()
width, height = self.GetSizeTuple()
|
by: Nicolas Pourcelot |
last post by:
Hello,
my script worked well until today : when I tried to launch it, I got the
following :
frame = MyFrame(None,-1,"Geometrie",size=wx.Size(600,400))
File "/home/nico/Desktop/wxGeometrie/version 0.73/geometrie.py", line
74, in __init__
self.commande.Bind(wx.EVT_CHAR, self.EvtChar)
AttributeError: wxTextCtrl instance has no attribute 'Bind'
| |
by: Young H. Rhiu |
last post by:
See: http://hilug.org/img/app_layout.GIF
I'm implementing an album-like application with wxpython but I'm new to
wxPython though I know how to program with python. The problem is that
it's not easy for me to deal with drawing layout stuff with wxpython.
What layout I'm thinking of looks like the gif image above.
The application is about saving some comments for each pictures on the
filesystem. There are two windows. The above one is a...
|
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
|
by: Marcin Kalicinski |
last post by:
I have an application written in C++ that uses wxWidgets for GUI. I use
embedded Python for scripting inside of this application. I want to use
wxPython to add GUI to my scripts - because my C++ App uses wxWidgets I
thought it to be easy. The problem is that wxPython knows nothing about
wxApp/wxFrame objects created in my C++ application, and insists (by giving
me asserts) that I create another wxApp object for wxPython inside my
scripts....
|
by: Jimmy |
last post by:
I'm kinda newbie to python and wxPython. Now I'm confronting a thorny
problem: how can I make my program minimize to the taskbar
represented as an ico, and when there is some message from network
coming, it will pop out?
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look !
Part I. Meaning of...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
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...
|
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 presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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();...
|
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...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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...
| |