Hello,
I am a novice inwxPython. I created a Fram with a textcontrol, radiobox and checkbox. On showing the frame, every widget, from static text to button on the bottom, everything is selected... None of the controls work. Can anybody give a tip to solve this problem.
Thanks,
Luc
4 1912
Sounds like an initialization problem.. not quite sure what you're experiencing however... can you give us your code that is causing this problem?
I usually keep a basic template when im developing wxPython GUIs and then add to it accordingly. That way i cant go wrong and my code looks readable - import wx
-
-
class MyFrame(wx.Frame):
-
def __init__(self):
-
wx.Frame.__init__(self, None, wx.ID_ANY, " My Frame ")
-
-
panel = MyPanel(self)
-
sizerv = wx.BoxSizer(wx.VERTICAL)
-
sizerv.Add(panel, 10, wx.EXPAND|wx.ALL, 0)
-
self.SetSizerAndFit()
-
self.SetSize((600,400))
-
-
class MyPanel(wx.Panel):
-
def __init__(self, parent):
-
wx.Panel.__init__(self, parent, wx.ID_ANY)
-
-
# Button and text controls go here
-
-
def Main():
-
app = wx.PySimpleApp()
-
frame = MyFrame()
-
frame.Show()
-
app.MainLoop()
-
-
if __name__ == '__main__':
-
Main()
- self.SetSizerAndFit() # doesn't this need the sizer in () ?
-
Doesn't that call need the sizer within the () ?
heh, i was at work when i typed the code up i didnt test it but yeah you're right self.SetSizerAndFit(sizerv) is the correct way ;p
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Jim Shady |
last post by:
Hi,
I am looking at the feasibility in using wxPython on a project our
company needs.
I intend to show a bar graph in a frame. I can either generate an
image and show it in a panel, or maybe...
|
by: wang xiaoyu |
last post by:
Hello:
i want use activex in wxpython program,but when i use MakeActiveXClass
an exception occurs.
this is my source code dealing the DICOM ocx.I must note that in this
program "hwtxcontrol" is...
|
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...
|
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...
|
by: Jan Danielsson |
last post by:
Hello all,
I wanted to plot some statistics, so I wrote a simple wxPython class
to do it. Then I realized that I would like to draw bar graphs, so I
added that too.
Since I'm a complete...
|
by: John Salerno |
last post by:
I'm using the sample code of the file 'simple.py' and trying to make a
single window with a panel in it, but I keep getting an error. Here's my
code: (I know I might need something else, like a...
|
by: zxo102 |
last post by:
Hi everyone,
I am using a python socket server to collect data from a socket
client and then control a image location ( wxpython) with the data,
i.e. moving the image around in the wxpython frame....
|
by: Tyler |
last post by:
Hello All:
I am currently working on a project to create an FEM model for school.
I was thinking about using wxPython to gather the 12 input variables
from the user, then, after pressing the...
|
by: Marcpp |
last post by:
Hi I need to call a widget from a button in WXPYTHON. I've tried to
this from a function like this, but when push the button, the program
opens a window and do error.
Any idea?
......
def...
|
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?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
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: 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...
|
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: 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...
| | |