Image hovering over video

First I had a frame with wx.STAY_ON_TOP with some info, this frame stayed always on the same position on top of my application, now I’m trying to attach that frame to the videoplayer, so I can resize the window and move it around (in the case I have multiple screens). After tinkering with the code I finally managed to attach it to the video, but now I cannot get it to stay on top of the video. It just stays on the background hidden by the video.

I tried to create it as wx.STAY_ON_TOP and wx.FRAME_FLOAT_ON_PARENT but nothing changes which is weird.

In order for the program to work you should have a mp4 file in the inside the Vid1 folder, the exec name is play_this.py and use esccape to exit the program.
I’ll paste the code, since I can’t attach the code (it needs a couple of folders to run vlc, and it does’nt allow to upload folders)

class DragShape:
    def __init__(self, bmp):
        self.bmp = bmp
        self.pos = (0,0)
        self.shown = True

    def draw(self, dc, op=wx.COPY):
        if self.bmp.Ok():
            #self.SetTransparent(76)
            memDC = wx.MemoryDC()
            memDC.SelectObject(self.bmp)
            #dc.Blit(13, 13, 930, 700, memDC, 0, 0, op, True)
            #dc.Blit(self.pos[0], self.pos[1], self.bmp.GetWidth(), self.bmp.GetHeight(), memDC, 0, 0, op, True)
            dc.Blit(self.pos[0], self.pos[1], self.bmp.GetWidth(), self.bmp.GetHeight(), memDC, 0, 0, op, True)
        # Blit(self, xdest, ydest, width, height, source, xsrc, ysrc, rop=COPY, useMask=False, xsrcMask=-1, ysrcMask=-1)
            return True
        else:
            return False

# ----------------------------------------------------------------------

class DragCanvas(wx.ScrolledWindow):
    '''Finds and paints the name of the video we are playing'''
    def __init__(self, parent, ID):
    #def __init__(self, *args, **kwargs):
        #wx.ScrolledWindow.__init__(self, *args, **kwargs)
        #wx.ScrolledWindow.__init__(self, parent, ID, size=(2000, 1000),style=wx.STAY_ON_TOP)
        wx.ScrolledWindow.__init__(self, parent, ID, size=(2000, 1000),style=wx.FRAME_FLOAT_ON_PARENT)
        self.shapes = []
        pos = (1500, 80)
        # Size of the label
        image_path = '.\i_assets\\turnTable.png'
        # Trying to put the logo image with transparency
        mono = wx.Image(image_path, wx.BITMAP_TYPE_PNG)
        self.SetTransparent(76)

        bmp_mono = wx.BitmapFromImage(mono)
        shape0 = DragShape(bmp_mono)
        shape0.pos = pos
        self.shapes.append(shape0)

        logo = wx.Image('.\i_assets\\logo.png', wx.BITMAP_TYPE_ANY)
        bmp_logo = wx.BitmapFromImage(logo)
        shape0 = DragShape(bmp_logo)
        shape0.pos = pos
        self.shapes.append(shape0)
        # Make a shape from some text
        #bg_colour = wx.Colour(128, 128, 128) # matches the bg image
        bg_colour = wx.Colour(0, 0, 0) # matches the bg image
        # Remember: .* is for clear the path
        p = re.compile(r'.*\d+_\w*_(.*)_(KW\d+)_(.*)_*(.*)\.mp4|.*\d+_\w*_(.*)_(KW\d+).*_*(.*)\.mp4')
        try:
            text1 = p.match(Hash[title]).group(1).replace('_', ' ')
            text2 = p.match(Hash[title]).group(2).replace('_', ' ')
            text3 = p.match(Hash[title]).group(3).replace('_', ' ')
        except:
            text1 = p.match(Hash[title]).group(5).replace('_', ' ')
            text2 = p.match(Hash[title]).group(6).replace('_', ' ')
            text3 = ""
        # Create canvas, we can control the margins
        #bmp1 = wx.EmptyBitmap(screensize[0], screensize[1])
        bmp1 = wx.EmptyBitmap(2000, 1000)
        # 'draw' the text onto the bitmap
        dc = wx.MemoryDC()
        dc.SelectObject(bmp1)
        dc.SetBackground(wx.Brush(bg_colour, wx.SOLID))
        dc.Clear()
        dc.SetTextForeground(wx.WHITE)
        # Header
        font = wx.Font(17, wx.SWISS, wx.NORMAL, wx.BOLD)
        dc.SetFont(font)
        dc.DrawText(text1, 17, 11)
        # Week
        font = wx.Font(15, wx.SWISS, wx.NORMAL, wx.NORMAL)
        dc.SetFont(font)
        dc.DrawText(text2, 17, 52)
        # Description
        font = wx.Font(17, wx.SWISS, wx.NORMAL, wx.NORMAL)
        dc.SetFont(font)
        dc.DrawText(text3, 100, 52) # '210, 52
        dc.SelectObject(wx.NullBitmap)
        mask1 = wx.Mask(bmp1, bg_colour)
        bmp1.SetMask(mask1)
        shape1 = DragShape(bmp1)
        shape1.pos = pos
        self.shapes.append(shape1)
        self.Bind(wx.EVT_PAINT, self.OnPaint)
        self.Layout()
        self.Show()

    # Go through our list of shapes and draw them in whatever place they are.
    def drawshapes(self, dc):
        for shape in self.shapes:
            if shape.shown:
                shape.draw(dc)

    # Fired whenever a paint event occurs
    def OnPaint(self, evt):
        dc = wx.PaintDC(self)
        self.PrepareDC(dc)
        self.drawshapes(dc)

Thanks for the help! I’ll be updating the post if I find anything new

I guess there is something I don’t understand, with the class wx.ScrolledWindow It can attach it to the Frame (where a video is being played) correctly, but i cannot make it show over the playing video, whereas the Frame, displays itself correctly (“hoovering” over the video) but it didn’t latch to the original Frame (where the video is playing) so if I move the window the Frame stays on an empty space…

···

El martes, 17 de mayo de 2016, 10:04:23 (UTC+2), Marcos del Amo escribió:

First I had a frame with wx.STAY_ON_TOP with some info, this frame stayed always on the same position on top of my application, now I’m trying to attach that frame to the videoplayer, so I can resize the window and move it around (in the case I have multiple screens). After tinkering with the code I finally managed to attach it to the video, but now I cannot get it to stay on top of the video. It just stays on the background hidden by the video.

I tried to create it as wx.STAY_ON_TOP and wx.FRAME_FLOAT_ON_PARENT but nothing changes which is weird.

In order for the program to work you should have a mp4 file in the inside the Vid1 folder, the exec name is play_this.py and use esccape to exit the program.
I’ll paste the code, since I can’t attach the code (it needs a couple of folders to run vlc, and it does’nt allow to upload folders)

class DragShape:
    def __init__(self, bmp):
        self.bmp = bmp
        self.pos = (0,0)
        self.shown = True

    def draw(self, dc, op=wx.COPY):
        if self.bmp.Ok():
            #self.SetTransparent(76)
            memDC = wx.MemoryDC()
            memDC.SelectObject(self.bmp)
            #dc.Blit(13, 13, 930, 700, memDC, 0, 0, op, True)
            #dc.Blit(self.pos[0], self.pos[1], self.bmp.GetWidth(), self.bmp.GetHeight(), memDC, 0, 0, op, True)
            dc.Blit(self.pos[0], self.pos[1], self.bmp.GetWidth(), self.bmp.GetHeight(), memDC, 0, 0, op, True)
        # Blit(self, xdest, ydest, width, height, source, xsrc, ysrc, rop=COPY, useMask=False, xsrcMask=-1, ysrcMask=-1)
            return True
        else:
            return False

# ----------------------------------------------------------------------


class DragCanvas(wx.ScrolledWindow):
    '''Finds and paints the name of the video we are playing'''
    def __init__(self, parent, ID):
    #def __init__(self, *args, **kwargs):
        #wx.ScrolledWindow.__init__(self, *args, **kwargs)
        #wx.ScrolledWindow.__init__(self, parent, ID, size=(2000, 1000),style=wx.STAY_ON_TOP)
        wx.ScrolledWindow.__init__(self, parent, ID, size=(2000, 1000),style=wx.FRAME_FLOAT_ON_PARENT)
        self.shapes = []
        pos = (1500, 80)
        # Size of the label
        image_path = '.\i_assets\\turnTable.png'
        # Trying to put the logo image with transparency
        mono = wx.Image(image_path, wx.BITMAP_TYPE_PNG)
        self.SetTransparent(76)

        bmp_mono = wx.BitmapFromImage(mono)
        shape0 = DragShape(bmp_mono)
        shape0.pos = pos
        self.shapes.append(shape0)

        logo = wx.Image('.\i_assets\\logo.png', wx.BITMAP_TYPE_ANY)
        bmp_logo = wx.BitmapFromImage(logo)
        shape0 = DragShape(bmp_logo)
        shape0.pos = pos
        self.shapes.append(shape0)
        # Make a shape from some text
        #bg_colour = wx.Colour(128, 128, 128) # matches the bg image
        bg_colour = wx.Colour(0, 0, 0) # matches the bg image
        # Remember: .* is for clear the path
        p = re.compile(r'.*\d+_\w*_(.*)_(KW\d+)_(.*)_*(.*)\.mp4|.*\d+_\w*_(.*)_(KW\d+).*_*(.*)\.mp4')
        try:
            text1 = p.match(Hash[title]).group(1).replace('_', ' ')
            text2 = p.match(Hash[title]).group(2).replace('_', ' ')
            text3 = p.match(Hash[title]).group(3).replace('_', ' ')
        except:
            text1 = p.match(Hash[title]).group(5).replace('_', ' ')
            text2 = p.match(Hash[title]).group(6).replace('_', ' ')
            text3 = ""
        # Create canvas, we can control the margins
        #bmp1 = wx.EmptyBitmap(screensize[0], screensize[1])
        bmp1 = wx.EmptyBitmap(2000, 1000)
        # 'draw' the text onto the bitmap
        dc = wx.MemoryDC()
        dc.SelectObject(bmp1)
        dc.SetBackground(wx.Brush(bg_colour, wx.SOLID))
        dc.Clear()
        dc.SetTextForeground(wx.WHITE)
        # Header
        font = wx.Font(17, wx.SWISS, wx.NORMAL, wx.BOLD)
        dc.SetFont(font)
        dc.DrawText(text1, 17, 11)
        # Week
        font = wx.Font(15, wx.SWISS, wx.NORMAL, wx.NORMAL)
        dc.SetFont(font)
        dc.DrawText(text2, 17, 52)
        # Description
        font = wx.Font(17, wx.SWISS, wx.NORMAL, wx.NORMAL)
        dc.SetFont(font)
        dc.DrawText(text3, 100, 52) # '210, 52
        dc.SelectObject(wx.NullBitmap)
        mask1 = wx.Mask(bmp1, bg_colour)
        bmp1.SetMask(mask1)
        shape1 = DragShape(bmp1)
        shape1.pos = pos
        self.shapes.append(shape1)
        self.Bind(wx.EVT_PAINT, self.OnPaint)
        self.Layout()
        self.Show()

    # Go through our list of shapes and draw them in whatever place they are.
    def drawshapes(self, dc):
        for shape in self.shapes:
            if shape.shown:
                shape.draw(dc)

    # Fired whenever a paint event occurs
    def OnPaint(self, evt):
        dc = wx.PaintDC(self)
        self.PrepareDC(dc)
        self.drawshapes(dc)

Thanks for the help! I’ll be updating the post if I find anything new

I think that some video players handle interactions with the
screen differently than other windows. Because of the nature of
making video work, I think at least some video players interact
directly with the video card at a low level, taking direct control.
This prevents other programs from writing over their part of the
screen. Maybe it’s just that they do a LOT of pixel writing so tend
to wipe out anything that’s been drawn over them. Either way, I’ve
never found a way to display info over a video like you can over a
still image.

David
···

On 05/23/2016 04:40 AM, Marcos del Amo
wrote:

    I guess there is something I don't understand, with

the class wx.ScrolledWindow It can attach it to the Frame (where
a video is being played) correctly, but i cannot make it show
over the playing video, whereas the Frame, displays itself
correctly (“hoovering” over the video) but it didn’t latch to
the original Frame (where the video is playing) so if I move the
window the Frame stays on an empty space…

    El martes, 17 de mayo de 2016, 10:04:23 (UTC+2), Marcos del Amo

escribió:

        First I had a frame with wx.STAY_ON_TOP with some info, this

frame stayed always on the same position on top of my
application, now I’m trying to attach that frame to the
videoplayer, so I can resize the window and move it around
(in the case I have multiple screens). After tinkering with
the code I finally managed to attach it to the video, but
now I cannot get it to stay on top of the video. It just
stays on the background hidden by the video.

        I tried to create it as wx.STAY_ON_TOP and

wx.FRAME_FLOAT_ON_PARENT but nothing changes which is weird.

        In order for the program to work you should have a mp4 file

in the inside the Vid1 folder, the exec name is play_this.py
and use esccape to exit the program.

        I'll paste the code, since I can't attach the code (it needs

a couple of folders to run vlc, and it does’nt allow to
upload folders)

class DragShape    :
def __init__(self,         bmp):
self        .bmp = bmp
self.pos = (0,0        )
self.shown = True

    def draw(self, dc,         op=wx.COPY):
if self            .bmp.Ok():
#self.SetTransparent(76)
                        memDC = wx.MemoryDC()
memDC.SelectObject(self            .bmp)
#dc.Blit(13, 13, 930, 700, memDC, 0, 0, op, True)
            #dc.Blit(self.pos[0], self.pos[1], self.bmp.GetWidth(), self.bmp.GetHeight(), memDC, 0, 0, op, True)
            dc.Blit(self.pos[0], self.pos[1], self.bmp.GetWidth(), self.bmp.GetHeight(), memDC, 0, 0, op, True        )
# Blit(self, xdest, ydest, width, height, source, xsrc, ysrc, rop=COPY, useMask=False, xsrcMask=-1, ysrcMask=-1)
            return True
        else            :
return False

# ----------------------------------------------------------------------


class DragCanvas    (wx.ScrolledWindow):
'''Finds and paints the name of the video we are playing'''
    def __init__(self, parent,     ID):
#def __init__(self, *args, **kwargs):
        #wx.ScrolledWindow.__init__(self, *args, **kwargs)
        #wx.ScrolledWindow.__init__(self, parent, ID, size=(2000, 1000),style=wx.STAY_ON_TOP)
        wx.ScrolledWindow.__init__(self, parent, ID, size=(2000, 1000),style=wx.FRAME_FLOAT_ON_        PARENT)
self        .shapes = []
pos = (1500, 80        )
# Size of the label
        image_path = '.\i_assets\\turnTable.png'
        # Trying to put the logo image with transparency
        mono = wx.Image(image_path,         wx.BITMAP_TYPE_PNG)
self.SetTransparent(76
        )
bmp_mono = wx.BitmapFromImage(mono)
shape0 = DragShape(bmp_mono)
shape0.pos = pos
self
        .shapes.append(shape0)
logo = wx.Image('.\i_assets\\logo.png',         wx.BITMAP_TYPE_ANY)
bmp_logo = wx.BitmapFromImage(logo)
shape0 = DragShape(bmp_logo)
shape0.pos = pos
self        .shapes.append(shape0)
# Make a shape from some text
        #bg_colour = wx.Colour(128, 128, 128) # matches the bg image
        bg_colour = wx.Colour(0, 0, 0) # matches the bg image
        # Remember: .* is for clear the path
        p = re.compile(r'.*\d+_\w*_(.*)_(KW\d+)_(.*)_*(.*)\.mp4|.*\d+_\w*_(.*)_(KW\d+).*_*(.*)\.mp4'        )
try            :
text1 = p.match(Hash[title]).group(1).replace('_', ' '            )
text2 = p.match(Hash[title]).group(2).replace('_', ' '            )
text3 = p.match(Hash[title]).group(3).replace('_', ' '        )
except            :
text1 = p.match(Hash[title]).group(5).replace('_', ' '            )
text2 = p.match(Hash[title]).group(6).replace('_', ' '            )
text3 = ""
        # Create canvas, we can control the margins
        #bmp1 = wx.EmptyBitmap(screensize[0], screensize[1])
        bmp1 = wx.EmptyBitmap(2000, 1000        )
# 'draw' the text onto the bitmap
                dc = wx.MemoryDC()
dc.SelectObject(bmp1)
dc.SetBackground(wx.Brush(bg_colour,         wx.SOLID))
dc.Clear()
dc.SetTextForeground(wx.WHITE)
# Header
        font = wx.Font(17, wx.SWISS, wx.NORMAL,         wx.BOLD)
dc.SetFont(font)
dc.DrawText(text1, 17, 11        )
# Week
        font = wx.Font(15, wx.SWISS, wx.NORMAL,         wx.NORMAL)
dc.SetFont(font)
dc.DrawText(text2, 17, 52        )
# Description
        font = wx.Font(17, wx.SWISS, wx.NORMAL,         wx.NORMAL)
dc.SetFont(font)
dc.DrawText(text3, 100, 52) # '210, 52
                dc.SelectObject(wx.NullBitmap)
mask1 = wx.Mask(bmp1,         bg_colour)
bmp1.SetMask(mask1)
shape1 = DragShape(bmp1)
shape1.pos = pos
self        .shapes.append(shape1)
self.Bind(wx.EVT_PAINT, self        .OnPaint)
self        .Layout()
self
    .Show()
# Go through our list of shapes and draw them in whatever place they are.
    def drawshapes(self,         dc):
for shape in self            .shapes:
if                 shape.shown:
shape.draw(dc)
# Fired whenever a paint event occurs
    def OnPaint(self,         evt):
dc = wx.PaintDC(self        )
self        .PrepareDC(dc)
self.drawshapes(dc)

Thanks for the help! I’ll be updating the post if I find anything new

– You received this message because you are subscribed to the Google Groups “wxPython-users” group.
To unsubscribe from this group and stop receiving emails from it, send an email to wxpython-users+unsubscribe@googlegroups.com
.
For more options, visit https://groups.google.com/d/optout.

I thought that maybe my problem was something along that lines, the quiclky refresh of the video painting over my label (wx.ScrolledWindow or wx.Window or wx.Panel), so maybe I could capture the refresh event and repaint my label, I read something about this somewhere online, so I think it’s possible but don’t know how to do it…

Another option I’ve been thinking is about the posibility to define my label (this time as a wx.Frame) position’s relative to the main frame (the videoplayer) which works well with the exception that it does not move with the window, so if I usually want the label in the top right corner instead of the screensize[0] -400,125 that I just do, I should define it’s position relative to the main frame instead of the screen, is there a way to do this?

Summary:
I have the label as a frame in which stays on top of the video (wx.frame) but it does not move when I move the video window and on the other hand we have the label as a Window/Panel/ScrolledWindow which it moves with the video window but it does not display itself correctly… There has to be a way to combine the two of them right?

···

El lunes, 23 de mayo de 2016, 17:40:09 (UTC+2), David escribió:

I *think* that some video players handle interactions with the

screen differently than other windows. Because of the nature of
making video work, I think at least some video players interact
directly with the video card at a low level, taking direct control.
This prevents other programs from writing over their part of the
screen. Maybe it’s just that they do a LOT of pixel writing so tend
to wipe out anything that’s been drawn over them. Either way, I’ve
never found a way to display info over a video like you can over a
still image.

David






  On 05/23/2016 04:40 AM, Marcos del Amo > wrote:
    I guess there is something I don't understand, with

the class wx.ScrolledWindow It can attach it to the Frame (where
a video is being played) correctly, but i cannot make it show
over the playing video, whereas the Frame, displays itself
correctly (“hoovering” over the video) but it didn’t latch to
the original Frame (where the video is playing) so if I move the
window the Frame stays on an empty space…

    El martes, 17 de mayo de 2016, 10:04:23 (UTC+2), Marcos del Amo > > escribió:
        First I had a frame with wx.STAY_ON_TOP with some info, this

frame stayed always on the same position on top of my
application, now I’m trying to attach that frame to the
videoplayer, so I can resize the window and move it around
(in the case I have multiple screens). After tinkering with
the code I finally managed to attach it to the video, but
now I cannot get it to stay on top of the video. It just
stays on the background hidden by the video.

        I tried to create it as wx.STAY_ON_TOP and

wx.FRAME_FLOAT_ON_PARENT but nothing changes which is weird.

        In order for the program to work you should have a mp4 file

in the inside the Vid1 folder, the exec name is play_this.py
and use esccape to exit the program.

        I'll paste the code, since I can't attach the code (it needs

a couple of folders to run vlc, and it does’nt allow to
upload folders)

class DragShape    :
def __init__(self,         bmp):
self        .bmp = bmp
self.pos = (0,0        )
self.shown = True

    def draw(self, dc,         op=wx.COPY):
if self            .bmp.Ok():
#self.SetTransparent(76)
                        memDC = wx.MemoryDC()
memDC.SelectObject(self            .bmp)
#dc.Blit(13, 13, 930, 700, memDC, 0, 0, op, True)
            #dc.Blit(self.pos[0], self.pos[1], self.bmp.GetWidth(), self.bmp.GetHeight(), memDC, 0, 0, op, True)
            dc.Blit(self.pos[0], self.pos[1], self.bmp.GetWidth(), self.bmp.GetHeight(), memDC, 0, 0, op, True        )
# Blit(self, xdest, ydest, width, height, source, xsrc, ysrc, rop=COPY, useMask=False, xsrcMask=-1, ysrcMask=-1)
            return True
        else            :
return False

# ----------------------------------------------------------------------


class DragCanvas    (wx.ScrolledWindow):
'''Finds and paints the name of the video we are playing'''
    def __init__(self, parent,     ID):
#def __init__(self, *args, **kwargs):
        #wx.ScrolledWindow.__init__(self, *args, **kwargs)
        #wx.ScrolledWindow.__init__(self, parent, ID, size=(2000, 1000),style=wx.STAY_ON_TOP)
        wx.ScrolledWindow.__init__(self, parent, ID, size=(2000, 1000),style=wx.FRAME_FLOAT_ON_        PARENT)
self        .shapes = []
pos = (1500, 80        )
# Size of the label
        image_path = '.\i_assets\\turnTable.png'
        # Trying to put the logo image with transparency
        mono = wx.Image(image_path,         wx.BITMAP_TYPE_PNG)
self.SetTransparent(76
        )
bmp_mono = wx.BitmapFromImage(mono)
shape0 = DragShape(bmp_mono)
shape0.pos = pos
self
        .shapes.append(shape0)
logo = wx.Image('.\i_assets\\logo.png',         wx.BITMAP_TYPE_ANY)
bmp_logo = wx.BitmapFromImage(logo)
shape0 = DragShape(bmp_logo)
shape0.pos = pos
self        .shapes.append(shape0)
# Make a shape from some text
        #bg_colour = wx.Colour(128, 128, 128) # matches the bg image
        bg_colour = wx.Colour(0, 0, 0) # matches the bg image
        # Remember: .* is for clear the path
        p = re.compile(r'.*\d+_\w*_(.*)_(KW\d+)_(.*)_*(.*)\.mp4|.*\d+_\w*_(.*)_(KW\d+).*_*(.*)\.mp4'        )
try            :
text1 = p.match(Hash[title]).group(1).replace('_', ' '            )
text2 = p.match(Hash[title]).group(2).replace('_', ' '            )
text3 = p.match(Hash[title]).group(3).replace('_', ' '        )
except            :
text1 = p.match(Hash[title]).group(5).replace('_', ' '            )
text2 = p.match(Hash[title]).group(6).replace('_', ' '            )
text3 = ""
        # Create canvas, we can control the margins
        #bmp1 = wx.EmptyBitmap(screensize[0], screensize[1])
        bmp1 = wx.EmptyBitmap(2000, 1000        )
# 'draw' the text onto the bitmap
                dc = wx.MemoryDC()
dc.SelectObject(bmp1)
dc.SetBackground(wx.Brush(bg_colour,         wx.SOLID))
dc.Clear()
dc.SetTextForeground(wx.WHITE)
# Header
        font = wx.Font(17, wx.SWISS, wx.NORMAL,         wx.BOLD)
dc.SetFont(font)
dc.DrawText(text1, 17, 11        )
# Week
        font = wx.Font(15, wx.SWISS, wx.NORMAL,         wx.NORMAL)
dc.SetFont(font)
dc.DrawText(text2, 17, 52        )
# Description
        font = wx.Font(17, wx.SWISS, wx.NORMAL,         wx.NORMAL)
dc.SetFont(font)
dc.DrawText(text3, 100, 52) # '210, 52
                dc.SelectObject(wx.NullBitmap)
mask1 = wx.Mask(bmp1,         bg_colour)
bmp1.SetMask(mask1)
shape1 = DragShape(bmp1)
shape1.pos = pos
self        .shapes.append(shape1)
self.Bind(wx.EVT_PAINT, self        .OnPaint)
self        .Layout()
self
    .Show()
# Go through our list of shapes and draw them in whatever place they are.
    def drawshapes(self,         dc):
for shape in self            .shapes:
if                 shape.shown:
shape.draw(dc)
# Fired whenever a paint event occurs
    def OnPaint(self,         evt):
dc = wx.PaintDC(self        )
self        .PrepareDC(dc)
self.drawshapes(dc)

Thanks for the help! I’ll be updating the post if I find anything new

– You received this message because you are subscribed to the Google Groups “wxPython-users” group.
To unsubscribe from this group and stop receiving emails from it, send an email to wxpython-user...@googlegroups.com
.
For more options, visit https://groups.google.com/d/optout.