1. Cast down
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Rep Power

    Displaying bitmaps of different sizes?

    In my program I have a ListBox. Every time you change selection a new bitmap is displayed to the right of the ListBox. I am using the wx.StaticBitmap widget.

    The bitmap does display but I have one problem. The window is not getting repainted properly. If I resize the window and/or the new bitmap is smaller than the previous one, a piece of the old bitmap is still on the surface. I am forcing a repaint of the window like this:


    These help. Without Layout() the sizers never re-size to accomodate the new bitmap size and without Refresh/Update more pieces get drawn. But this is still not enough, as I need to cover the window or minimize it for the full bitmap to be painted clearly. What did I miss?

    I added screen shots. The first one shows how the bitmap looks when I first move the selection to it. The second shows the pic after I press a button or cover that part of the window.


    BTW those are 3 different wxStaticBitmap widgets.
    Last edited by movEAX_444; June 30th, 2005 at 02:22 AM.

IMN logo majestic logo threadwatch logo seochat tools logo