Transparent bitmap(image) in windows!

Discussion in 'Python' started by SMALLp, Apr 5, 2008.

  1. SMALLp

    SMALLp Guest

    Hello everyone!

    First I want to apologize for asking question about wxPython on this group.

    I'm doing project that uses wx.ScrolledPanel few wx.Bitmap on it. It all
    looks wonderful on Ubuntu and very very bad on windows because images
    aren't transparent. As a found out it is problem that windows drowns
    each image in separate window (or something like that)

    I'm looking for best and easiest solution for this problem. I found
    something to bind PAINT event to empty function but it doesn't work
    because of scrolled panel.

    Please help!

    Thanks!
    SMALLp, Apr 5, 2008
    #1
    1. Advertising

  2. SMALLp

    SMALLp Guest

    this is code that adds image:

    <CODE>
    kartaGif = wx.Image("slike/karta.gif", wx.BITMAP_TYPE_GIF)
    kartaGif.Rescale(self.sizeX, self.sizeY)
    kartaGif = wx.BitmapFromImage(kartaGif)
    mask = wx.Mask(kartaGif, wx.WHITE)
    kartaGif.SetMask(mask)
    self.karta = wx.StaticBitmap(self.mPanel, -1, kartaGif, (10, 10),
    (kartaGif.GetWidth(), kartaGif.GetHeight()))
    self.karta.Bind(wx.EVT_LEFT_DOWN, self.getPos)
    </CODE>


    SMALLp wrote:
    > Hello everyone!
    >
    > First I want to apologize for asking question about wxPython on this group.
    >
    > I'm doing project that uses wx.ScrolledPanel few wx.Bitmap on it. It all
    > looks wonderful on Ubuntu and very very bad on windows because images
    > aren't transparent. As a found out it is problem that windows drowns
    > each image in separate window (or something like that)
    >
    > I'm looking for best and easiest solution for this problem. I found
    > something to bind PAINT event to empty function but it doesn't work
    > because of scrolled panel.
    >
    > Please help!
    >
    > Thanks!
    SMALLp, Apr 5, 2008
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?SmF4?=
    Replies:
    2
    Views:
    1,961
    Ismail Rajput
    Feb 21, 2004
  2. Gandalf

    Masked bitmap from bitmap

    Gandalf, Jan 29, 2004, in forum: Python
    Replies:
    0
    Views:
    565
    Gandalf
    Jan 29, 2004
  3. Replies:
    1
    Views:
    330
    Noah Roberts
    Jul 24, 2006
  4. xqggz
    Replies:
    1
    Views:
    403
    Victor Bazarov
    Jun 19, 2007
  5. fancyerii
    Replies:
    7
    Views:
    835
    Knute Johnson
    Aug 3, 2008
Loading...

Share This Page