Bonjour , je voudrait mettre mon image de fond ( StaticBitmap ) en arrière-plan
car mes boutons sont derrière l'image enfaite , par contre je voit bien la jauge et le texte !

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
 
#!/usr/bin/python
# -*- coding: iso-8859-1 -*-
# gauge.py
import os,sys
import wx
 
class MaFrame(wx.Frame):
    def __init__(self, parent, id, title):
        wx.Frame.__init__(self, parent, id, title,size=(358, 478))
        self.timer = wx.Timer(self, -1)
        self.count = 0
        self.Bind(wx.EVT_TIMER, self.OnTimer, self.timer)
        panel = wx.Panel(self, -1)
        #Mise en place du fond
        Lefond = wx.Bitmap("Le_Design.jpg", wx.BITMAP_TYPE_ANY)
        wx.StaticBitmap(panel,-1, Lefond,pos=(0,0))
        #
        self.gauge = wx.Gauge(panel, -1, 80, wx.Point(8,345),size=(334, 25))
        self.timer.Start(100)
        bouton_quitter = wx.Button(panel, -1, "Quitter",  wx.Point(283, 385), wx.Size(-1, -1))
        bouton_demarrer = wx.Button(panel, -1, "Demarrer",  wx.Point(180, 385), wx.Size(-1, -1))
        self.Bind(wx.EVT_BUTTON, self.Fermeture, bouton_quitter)
        bouton_pause = wx.Button(panel, -1, "Pause",  wx.Point(10, 385), wx.Size(-1, -1))
        self.Bind(wx.EVT_BUTTON, self.Mode_pause, bouton_pause)
        self.Bind(wx.EVT_BUTTON, self.Mode_Demarrer, bouton_demarrer)
        self.Texte_progression = wx.StaticText(panel, -1, pos=(20,150))
        self.Texte_progression.SetLabel("Aucune action en cours ")
 
 
class MonApp(wx.App):
	def OnInit(self):
		frame = MaFrame(None, -1, 'Mon Application')
		frame.SetSizeHints(358,478,358,478)
		frame.CenterOnParent()
		frame.Show(True)
		return True
 
app = MonApp(0)
app.MainLoop()

Voilà , si quelqu'un peut m'éclairé , svp !