473,805 Members | 2,077 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 *
ID_ABOUT=101
ID_EXIT=110
class MainWindow(wxFr ame):
def __init__(self,p arent,id,title) :
wxFrame.__init_ _(self,parent,w xID_ANY, title, size = (
800,600),style= wxDEFAULT_FRAME _STYLE|wxNO_FUL L_REPAINT_ON_RE 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,
-1),wxSL_HORIZON TAL | wxSL_TOP | wxSL_AUTOTICKS | wxSL_LABELS |
wxTRANSPARENT_W INDOW)
slider.SetTickF req(1, 1)
slider.SetValue (1800)
self.CreateStat usBar() # A StatusBar in the bottom of the
window
# 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
MenuBar
self.SetMenuBar (menuBar) # Adding the MenuBar to the Frame
content.
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.Show(true)
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")
app.MainLoop()

TIA,
Scott

Jul 18 '05 #1
0 1216

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

Similar topics

2
1681
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,
7
2330
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
10
4982
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...
5
2188
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..........
5
4160
by: Gilles DRIDI | last post by:
Does someone has installed wxPython on the Cygwin platform, environment ? Thank you Gilles DRIDI http://cdridi.club.fr
16
5237
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:
2
1442
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...
5
1577
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...
1
1865
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.
0
9596
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,...
0
10360
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 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...
1
10366
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10105
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7646
isladogs
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...
0
5542
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...
0
5677
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4323
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
2
3845
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.