SOLVED Re: migrating NotebookCtrl->flatnotebook how to get tooltips?

Hi Paul,

···

On 7/10/08, Paul Sijben wrote:

OK I solved it by making an EnableToolTip call on the FlatNoteBook.

I'll be happy to feed back my changes (flexible fancy tabs, gradient on the
disabled tab and greying out of the disabled image), what is the process for
that?

Either enter a "patch report" on the wxWidgets trac (specify
wxPython-specific) or send me the modified code and I will change the
source in SVN. Thank you for contributing back your enhancements :smiley:

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/

Since we are talking about FlatNotebook, I noticed that FlatNotebook
doesn't quite follow the wx.Notebook semantics of .RemovePage(). That
is, FlatNotebook.RemovePage() deletes the specified page rather than
allowing the user to .RemovePage() then either AppendPage() or
InsertPage().

- Josiah

···

On Thu, Jul 10, 2008 at 9:27 AM, Andrea Gavana <andrea.gavana@gmail.com> wrote:

Hi Paul,

On 7/10/08, Paul Sijben wrote:

OK I solved it by making an EnableToolTip call on the FlatNoteBook.

I'll be happy to feed back my changes (flexible fancy tabs, gradient on the
disabled tab and greying out of the disabled image), what is the process for
that?

Either enter a "patch report" on the wxWidgets trac (specify
wxPython-specific) or send me the modified code and I will change the
source in SVN. Thank you for contributing back your enhancements :smiley:

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/
_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwidgets.org
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users

Indeed if I do it after loading, before I put it in the image list the result is good.

            bitmap=wx.Bitmap(file)
            img=bitmap.ConvertToImage().ConvertToGreyscale()
            bitmap=img.ConvertToBitmap()
            index=self.frame.nb.il.Add(bitmap)

(converting that, again, to greyscale gives the black square again)

So what happens when a bitmap gets added to to an imagelist? Is the bitmap converted into something else?

Paul

Paul Sijben wrote:

···

will try, the problem is that for normal operations I can not do that as this code is in my updated flatnotebook.

Robin Dunn wrote:

Paul Sijben wrote:

Running my code on Linux gave me one icon in three that did not greyscale well with the code below. On winXP all three icons have a black background.

imagelist is filled from transparent PNGs and render well when used regularly.

    bmp=pc._ImageList.GetBitmap(number)
    img=bmp.ConvertToImage().ConvertToGreyscale() bmp=img.ConvertToBitmap()
    dc.DrawBitmap(bmp,posx,posy)

What am I doing wrong?

I"m not sure. Does it make any difference if you bypass the image list and just load the PNG and start with the greyscale from that point?

--
Paul Sijben tel: +31334566488
Eemvalley Technology fax: +31334557523
the Netherlands http://eemvalley.com

Paul Sijben wrote:

Robin,

I found out that the bitmap has an Alpha before I put it into the ImageList but the bitmap I get from the ImageList does not have it. Trying to re-enable it in the bitmap I get from the ImageList does not help.

Is this a bug in the ImageList?

On Windows the native ImageList is used. When you call GetBitmap it uses the native API to get a HBITMAP handle of the image stored in the image list and a new wxBitmap is wrapped around it. I wouldn't be surprised if the handle type is one that doesn't include the alpha channel. It may be possible to fix or workaround this however, so go ahead and create a bug report about it.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!