473,399 Members | 4,192 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

wxpython: "background text" into MDI parent frame

75
How do I add "background text" into MDI parent frame, the text will be now erased if I move the MDI Parent frame, or I can also erase text with moving MDI Child frame, need to somehow refresh the text, how to do it?

wx.FULL_REPAINT_ON_RESIZE style on MDI parent frame would help a little, but I would also need to call self.Layout() (and I still can erase the text moving child frame over the text...)

Expand|Select|Wrap|Line Numbers
  1. #!/usr/bin/env python
  2. # -*- coding: UTF-8 -*-
  3.  
  4. import wx
  5.  
  6. class MyFrame(wx.MDIParentFrame):
  7.    def __init__(self):
  8.  
  9.       wx.MDIParentFrame.__init__(self, None, title="testing", id=-1, size=(400, 400), style=wx.DEFAULT_FRAME_STYLE | wx.FRAME_NO_WINDOW_MENU)
  10.  
  11.       background_text = wx.StaticText(self, id=-1, label="This is background text", style=wx.ALIGN_RIGHT)
  12.       background_text.SetBackgroundColour("#BB0000")
  13.  
  14.       vbox = wx.BoxSizer(wx.VERTICAL)
  15.       vbox.AddSpacer((1,1),1)
  16.       vbox.Add(background_text, 0, wx.ALL|wx.ALIGN_RIGHT, 5)
  17.  
  18.       self.SetAutoLayout(True)
  19.       self.SetSizer(vbox)
  20.       self.Layout()
  21.  
  22.       child_frame = wx.MDIChildFrame(self, -1, "MDI child", size=(150,150))
  23.       child_frame.Show(True)
  24.  
  25. app = wx.PySimpleApp()
  26. MyFrame().Show()
  27. app.MainLoop()
  28.  
Aug 25 '08 #1
0 2036

Sign in to post your reply or Sign up for a free account.

Similar topics

17
by: Torbjørn Pettersen | last post by:
I've got a table where I want some of the cells to use a background image. The cells have variable height, so I am using an image with a rather small height to fill up the background of the cells,...
4
by: Charles Law | last post by:
When displaying the Color Picker for a web page (in the VS IDE), Background is listed on the System Colors tab. Also, Color.FromName("Background").IsNamedColor returns True. However,...
9
by: Arash Dejkam | last post by:
Hi All, Is it possible to write on an <OBJECT type="text/html"> using document.write() from within the html containing that tag the way we write on a popup window? I couldn't do that after a lot...
1
by: Christopher P. Winter | last post by:
I'm seeing some unexpected behavior with Text-indent, as shown on this page: http://www.chris-winter.com/Digressions/HP_Kayak/My_Kayak.html I set up the following style rules for footnotes: ...
0
by: huobazi | last post by:
I have many dropdownlist controls in my ascx (and use LoadControl in a aspx fiel) file,so i write a method "InitList(DropDownList list,string strsql,string TextField,string ValueField)" but when i...
2
by: Just D. | last post by:
Who knows what should we include into aspx file to show some image as a background picture but only once at the top of the page? I don't want to add the Image control because even if it uses a...
8
by: Maxwell2006 | last post by:
Hi, Using ASP.NET 2.0, I have this tag in my asp page: <td runat =server background="~/Images/Header2.gif">&nbsp;</td> The problem is when I run the page, the server side TD tag renders...
3
by: bulwark_jrm | last post by:
I'm trying to duplicate functionality found in a Windows application at one of my clients. Essentially, another programmer was able to arrange a lot of search options into a single dialog box by...
1
by: Miggiddy79 | last post by:
Does any body know how to fix this. I am trying to validate these html codes through the markup validation. I have 5 error messages: 1) Line 114, Column 15: there is no attribute "BACKGROUND" ....
0
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
0
BarryA
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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...
0
Oralloy
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,...
0
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...
0
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...
0
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...
0
agi2029
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 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.