473,698 Members | 2,114 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

help with wxSlider & wxPython

I have the code below. I have changed the background of the frame to
white, but I cannot get the wxSlider to not be the ugly gray color.
Can someone tell me how to change it to a transparent background (I
tried wxTRANSPARENT_W INDOW without success)?

import os
from wxPython.wx import *
class MainWindow(wxFr ame):
def __init__(self,p arent,id,title) :
wxFrame.__init_ _(self,parent,w xID_ANY, title, size = (
#self.control = wxTextCtrl(self , 1, style=wxTE_MULT ILINE)
wxStaticText(se lf, -1, "Distance to Move", (30, 40))
slider = wxSlider(self, 100, 25, 0, 3600, (30, 60), (400,
slider.SetTickF req(1, 1)
slider.SetValue (1800)
self.CreateStat usBar() # A StatusBar in the bottom of the
# Setting up the menu.
filemenu= wxMenu()
filemenu.Append (ID_ABOUT, "&About"," Version 001")
filemenu.Append Separator()
filemenu.Append (ID_EXIT,"E&xit "," Terminate the program")
# Creating the menubar.
menuBar = wxMenuBar()
menuBar.Append( filemenu,"&File ") # Adding the "filemenu" to the
self.SetMenuBar (menuBar) # Adding the MenuBar to the Frame
EVT_MENU(self, ID_ABOUT, self.OnAbout) # attach the menu-event
ID_ABOUT to the
EVT_MENU(self, ID_EXIT, self.OnExit) # attach the menu-event
ID_EXIT to the
self.SetBackgro undColour(wxWHI TE)
self.Center(wxB OTH)
def OnAbout(self,e) :
d= wxMessageDialog ( self, "test","Abo ut test", wxOK)
d.ShowModal() # Shows it
d.Destroy() # finally destroy it when finished.
def OnExit(self,e):
self.Close(true ) # Close the frame.
app = wxPySimpleApp()
frame = MainWindow(None , -1, "test")


Jul 18 '05 #1
0 1211

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

Similar topics

by: flupke | last post by:
Hi, i'm developing an app in wxPython but when i have an error in the wxPython code i've written, the app starts, an extra windows is opened where the error messages are print and then it closes again. Off course, this is to fast for the human eye to read :) How can i avoid this and have the wxPython messages arrive at the console just like the "normal" python error messages? Thanks,
by: Pajo | last post by:
What should I install so I can connect to sqlite from Python. One simple example would be very helpfull. Thanks, Pajo
by: Mario | last post by:
Hello all, I'm trying hard to make possible to print some simple text from python to the default printer using wxPython, after days of internet searches I found this page: http://wiki.wxpython.org/index.cgi/Printing but is impossible to use this script even if I do exactly as said there. I think the script is buggy or I am not able to use it, even if seems very simple to use... Anyone can give me an hint on how to easily and simply print...
by: linuxfreak | last post by:
Hi guys, Has anyone installed wxPython on Fedora Core 4. Apparently it need the libstdc++.so.5 file while Fedora installs the newer libstdc++.so.6 file. I tried installing the libstdc rpm from fedora core 3 which would have installed the required file but Fedora does not allow multiple versions of the same file . Man this is frustrating. Help desparately required..........
by: Gilles DRIDI | last post by:
Does someone has installed wxPython on the Cygwin platform, environment ? Thank you Gilles DRIDI http://cdridi.club.fr
by: PyDenis | last post by:
Today, I found strange error while using py2exe: 1. I wrote simple program and save as 1.py: import win32ui import win32con win32ui.MessageBox('Test messageBox.' , 'Test', win32con.MB_OK | win32con.MB_TOPMOST ) 2. I create 1_setup.py file for py2exe:
by: nelson | last post by:
Hi all, i'm doing a COM server that have to expose some graphics (panels and configuration controls), that would be embedded in an application through OLE. I was wondering if I can do this using wxPython. Another question is if my COM server would inherits from one of the wxPython class. If it's true, from which? wx.App, wx.Frame, wx.Panel. The important thing is that i would to have the same effect that you have when you the calendar...
by: MatthewWarren | last post by:
Hi, I'm wondering if anyone can tell me here, or point to a specific tutorial ( I have searched for 1/2hour, but can find only reference style docs or not-quite-what-im-after help) on how to build a wxSashWindow in wxPython. I'm just starting out with wxPython, and the first thing i need to do is use 3 sash windows, 1 split vertically, and on the left and right of that a SashWindow splitting horizontally. I can make frames, buttons, use...
by: Eric von Horst | last post by:
Hi, I need some advice on Drag&Drop. What I want to achieve is the following: - I have a window that is divided in two : on the left hand I have a wx.TreeCtlr and on the other hand a wx.StaticBitmap I want to be able to drag an item from the tree onto the static bitmap.
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, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
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,...
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
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: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
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...

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.