Hi everybody !
When i call my class Maj, my staticText label, there is no text appear just a white Framework... - class Maj(wx.Frame):
-
def __init__(self, parent, ID, title):
-
resolution = wx.DisplaySize()
-
pos = (resolution[0]/2-175,resolution[1]/2-15)
-
-
wx.Frame.__init__(self, parent, ID, title, pos, wx.Size(400, 40), style= wx.FRAME_NO_TASKBAR | wx.STAY_ON_TOP | wx.RAISED_BORDER )
-
self.SetBackgroundColour("#ECE9D8")
-
-
label = wx.StaticText(self, -1, "Mise à jour... ", (0,0), (400,40), style =wx.ALIGN_CENTER)
Can you help me please
1 1557
Hi everybody !
When i call my class Maj, my staticText label, there is no text appear just a white Framework... - class Maj(wx.Frame):
-
def __init__(self, parent, ID, title):
-
resolution = wx.DisplaySize()
-
pos = (resolution[0]/2-175,resolution[1]/2-15)
-
-
wx.Frame.__init__(self, parent, ID, title, pos, wx.Size(400, 40), style= wx.FRAME_NO_TASKBAR | wx.STAY_ON_TOP | wx.RAISED_BORDER )
-
self.SetBackgroundColour("#ECE9D8")
-
-
label = wx.StaticText(self, -1, "Mise à jour... ", (0,0), (400,40), style =wx.ALIGN_CENTER)
Can you help me please
This works on my system (no changes made): - # -*- coding: latin-1 -*-
-
-
import wx
-
-
def create(parent, ID, title):
-
return Maj(parent, ID, title)
-
-
class Maj(wx.Frame):
-
def __init__(self, parent, ID, title):
-
resolution = wx.DisplaySize()
-
pos = (resolution[0]/2-175,resolution[1]/2-15)
-
-
wx.Frame.__init__(self, parent, ID, title, pos, wx.Size(400, 40), style= wx.FRAME_NO_TASKBAR | wx.STAY_ON_TOP | wx.RAISED_BORDER )
-
self.SetBackgroundColour("#ECE9D8")
-
-
label = wx.StaticText(self, -1, "Mise à jour... ", (0,0), (400,40), style =wx.ALIGN_CENTER)
-
-
-
-
if __name__ == "__main__":
-
app = wx.PySimpleApp()
-
frame = create(None, -1, 'Hello World')
-
app.SetTopWindow(frame)
-
frame.Show()
-
app.MainLoop()
But a Frame() is not the right place to do this. You can set all those attributes of the StaticText() object on a parent (Frame, Panel or Dialog). You can not show a Frame() within another Frame().
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Tobias Oberascher |
last post by:
Good Morning, everybody!
I've encountered big problems with one of my file-fields, which was
implemented for uploading files. Some of my users don't have any problems at
all - the...
|
by: python newbie |
last post by:
Hi,
I have a wxPython app which dump errors when I close it ( in
the debug output at bottom of Komodo, when I close my app. )
Where I got the code for my GUI:
Straight from the wxProject.py...
|
by: Mariusz Jedrzejewski |
last post by:
Hi,
I'll be very grateful if somebody can explain me why my Opera 7.23
(runing under linux) doesn't show me inner tables. Using below code I
can see only "inner table 1". There is no problem with...
|
by: KvS |
last post by:
Hi all,
I'm pretty new to (wx)Python so plz. don't shoot me if I've missed
something obvious ;). I have a panel inside a frame, on which a Button
and a StaticText is placed:
self.panel =...
|
by: Christopher Benson-Manica |
last post by:
(Followups set to comp.std.c. Apologies if the crosspost is unwelcome.)
strchr() is to strrchr() as strstr() is to strrstr(), but strrstr()
isn't part of the standard. Why not?
--...
|
by: Dabbler |
last post by:
I'm using a gridview bound to an SqlDataSource. If the table is empty the
gridview doesn't appear on the page. Is there a way I can force the empty
gridview to appear to allow inserting new rows?
...
|
by: David |
last post by:
Plaese look at this simple class.
import wx
class MyFrame(wx.Frame):
def __init__(self, parent, id):
wx.Frame.__init__(self, parent, id, "Hide test", size=(160,160))
# create widgets
|
by: Randy Smith |
last post by:
Hi All,
My menu control doesn't "dropdown". The "Home" menu item doesn't appear,
nor does the "Jobs" item. And, the 2nd group (Labor and Materials) in
web.sitemap doesn't appear at all. The...
|
by: Simon van Beek |
last post by:
Dear reader,
What can be wrong in my ComboBox, the property "Auto Expand" is set to Yes,
but by typing in the ComboBox it doesn't expand. Is this because the source
of the ComboBox is a...
|
by: Aftab Ahmad |
last post by:
Hello Experts!
I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: marcoviolo |
last post by:
Dear all,
I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
| |