The matplotlib 0.81 version disables buttons on the toolbar which are not usable at the time.
Doing this shows a black square instead of applying the alpha channel (correct terminology?).
To ensure that the icon file actually is o.k. I created a toolbar with the icon in question and it shows correctly as a black and white version when it is in-active and a colored version when it is active.
Matplotlib uses "AddSimpleTool" to create the tools, so I tried "AddLabelTool" and "DoAddTool". With the later two calls the image is now in color if active or in-active - still not showing the black and white version.
Here some code snippets: self.AddLabelTool(label = 'Back', bitmap = _load_bitmap2('back.png'), bmpDisabled = wx.NullBitmap, id = self._NTB2_BACK, longHelp = '', shortHelp = '')
_load_bitmap2 is just checking that the image exists and returns a wx.Bitmap instance.
The attached "toolbartest.png" shows what we like to see and the "matplottoolbar.png" shows the back button in color using the "AddLabelTool" and the grey square is for the forward button which uses "AddSimpleTool".
Any hints on how to fix this would be very welcome.
Werner F. Bruhin wrote: > The attached "toolbartest.png" shows what we like to see and the > "matplottoolbar.png" shows the back button in color using the > "AddLabelTool" and the grey square is for the forward button which uses > "AddSimpleTool".
> Any hints on how to fix this would be very welcome.
Both AddSimpleTool and AddLabelTool call DoAddTool, so there must be some other difference between the two cases. What is the platform and version? Can you send a small sample (including the images) that shows the problem?
-- Robin Dunn Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
The mystery of the color or grey square button is me forgetting what I am doing!
The grey square is the due to matplotlib using "xpm" file format and wxPython only supports alpha channel with "png" file format, according to the documentation.
However I still can't figure out why the color version is shown (when using "png" files) when the tool button is disabled, it should show the grey & white version.
Had no success in creating a small test program showing the problem, will have another go at it next week.
>>> The attached "toolbartest.png" shows what we like to see and the >>> "matplottoolbar.png" shows the back button in color using the >>> "AddLabelTool" and the grey square is for the forward button which >>> uses "AddSimpleTool".
>>> Any hints on how to fix this would be very welcome.
>> Both AddSimpleTool and AddLabelTool call DoAddTool, so there must be >> some other difference between the two cases. What is the platform >> and version? Can you send a small sample (including the images) that >> shows the problem?
> I am running on Windows XP but I believe Andrea is seeing the same and > if I recall correctly she is on Windows XP.
> Small sample with matplotlib (you would need to get the 0.8.1 > version)?! I only see the problem in matplotlib with the WXAgg, I > can't reproduce it in a small test program (at least not yet).
> Just in case you have matplotlib try running wxcursor_demo (I attach > it in case you don't have the matplotlib example stuff).
>> The attached "toolbartest.png" shows what we like to see and the >> "matplottoolbar.png" shows the back button in color using the >> "AddLabelTool" and the grey square is for the forward button which >> uses "AddSimpleTool".
>> Any hints on how to fix this would be very welcome.
> Both AddSimpleTool and AddLabelTool call DoAddTool, so there must be > some other difference between the two cases. What is the platform and > version? Can you send a small sample (including the images) that > shows the problem?
I am running on Windows XP but I believe Andrea is seeing the same and if I recall correctly she is on Windows XP.
Small sample with matplotlib (you would need to get the 0.8.1 version)?! I only see the problem in matplotlib with the WXAgg, I can't reproduce it in a small test program (at least not yet).
Just in case you have matplotlib try running wxcursor_demo (I attach it in case you don't have the matplotlib example stuff).
>>> The attached "toolbartest.png" shows what we like to see and the >>> "matplottoolbar.png" shows the back button in color using the >>> "AddLabelTool" and the grey square is for the forward button which >>> uses "AddSimpleTool".
>>> Any hints on how to fix this would be very welcome.
>> Both AddSimpleTool and AddLabelTool call DoAddTool, so there must be >> some other difference between the two cases. What is the platform and >> version? Can you send a small sample (including the images) that >> shows the problem?
> I am running on Windows XP but I believe Andrea is seeing the same and > if I recall correctly she is on Windows XP.
dude :) she is a he :) http://xoomer.virgilio.it/infinity77/ In Italy Andrea is a boy name ;) honest mistake tho :) my future wife's name is Andreea. :)
>> I am running on Windows XP but I believe Andrea is seeing the same and >> if I recall correctly she is on Windows XP.
>dude :) she is a he :) >http://xoomer.virgilio.it/infinity77/ >In Italy Andrea is a boy name ;) >honest mistake tho :) my future wife's name is Andreea. :)
Hehehehehehe... it is normal, everywhere I go people keep saying "from your name I was expecting a woman..." No rpoblem for that ;-) However, when I posted my first controls (like FoldPanelBar, HyperLinkCtrl, ExtendedChoice and so on), I was somehow impressed by the number of nice replies/comments I got. Did the "he/she" confusion influenced your suggestions/comments? ;-)))))
On Fri, 10 Jun 2005 10:57:12 +0200, andrea_gav...@tin.it wrote: >>> I am running on Windows XP but I believe Andrea is seeing the same and >>> if I recall correctly she is on Windows XP.
>>dude :) she is a he :) >>http://xoomer.virgilio.it/infinity77/ >>In Italy Andrea is a boy name ;) >>honest mistake tho :) my future wife's name is Andreea. :)
>Hehehehehehe... it is normal, everywhere I go people keep saying "from your >name I was expecting a woman..." >No rpoblem for that ;-) >However, when I posted my first controls (like FoldPanelBar, HyperLinkCtrl, >ExtendedChoice and so on), I was somehow impressed by the number of nice >replies/comments I got. Did the "he/she" confusion influenced your suggestions/comments? >;-)))))
>Andrea.
Hello Andrea,
in your first posts, I wasn't really sure. You could be a "she" or "he", but that should make no difference.
At the same time I remembered a former Formula One driver "Andrea de Cesaris".
In german "Andrea" is a woman forename (not sure, how it is in english) in oppostition to Andreas. But more often, woman forenames are longer than the man counterparts.
man -> woman
Franz -> Franziska Martin -> Martina Stefan -> Stefanie Daniel -> Daniela
andrea_gav...@tin.it wrote: >>>I am running on Windows XP but I believe Andrea is seeing the same and >>>if I recall correctly she is on Windows XP.
>>dude :) she is a he :) >>http://xoomer.virgilio.it/infinity77/ >>In Italy Andrea is a boy name ;) >>honest mistake tho :) my future wife's name is Andreea. :)
>Hehehehehehe... it is normal, everywhere I go people keep saying "from your >name I was expecting a woman..." >No rpoblem for that ;-) >However, when I posted my first controls (like FoldPanelBar, HyperLinkCtrl, >ExtendedChoice and so on), I was somehow impressed by the number of nice >replies/comments I got. Did the "he/she" confusion influenced your suggestions/comments? >;-)))))
Absolutely :-D
Being Swiss I should not have missed that one :-[ , hope you'll forgive me!
Coming back to this toolbar issue, created a small test program to try to imitate the stuff matplotlib does with the toolbar but on my system (XP) it works like a charm, but within matplotlib I still get this damn grey squares.
On Fri, 10 Jun 2005 16:23:18 +0300, the_shelter <pdf...@the-shelter.de> wrote:
> Just to make the she/he subject complete: > Andrea stems from greek meaning 'man' ... > Being a German myself, I wonder what language got confused ;) > But seriously, > with me affection only has me for the nice controls you have posted. > Keep hanging in there! I really like them a lot!
now let's face it... we all like Andrea for the widgets he brought to wxPython... but... it wouldn't have hurt to look a little bit like this: http://devone.de/pics/linux_chick.jpg
Just to make the she/he subject complete: Andrea stems from greek meaning 'man' ... Being a German myself, I wonder what language got confused ;) But seriously, with me affection only has me for the nice controls you have posted. Keep hanging in there! I really like them a lot!
-- Best regards, the_shelter mailto:pdf...@the-shelter.de
>now let's face it... we all like Andrea for the widgets he brought to >wxPython... but... it wouldn't have hurt to look a little bit like this: >http://devone.de/pics/linux_chick.jpg
Wow... what a nice programmer this chick ;-) No luck for me, I have never met a Linux/Windows/Unix/Mac/Debian/Whatever programmer like that... mhm, do I have to switch to another GUI tool to find her? ;-)
> The mystery of the color or grey square button is me forgetting what I > am doing!
> The grey square is the due to matplotlib using "xpm" file format and > wxPython only supports alpha channel with "png" file format, according > to the documentation.
XPM files do support a mask, or in other words a 1-bit alpha where each pixel is either fully transparent or fully opaque, (so there is no blending.)
> However I still can't figure out why the color version is shown (when > using "png" files) when the tool button is disabled, it should show the > grey & white version.
That I don't know...
-- Robin Dunn Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
On Fri, 10 Jun 2005 16:35:14 +0300, "Peter Damoc" <pda...@gmx.net> wrote: >On Fri, 10 Jun 2005 16:23:18 +0300, the_shelter <pdf...@the-shelter.de> >wrote:
>> Just to make the she/he subject complete: >> Andrea stems from greek meaning 'man' ... >> Being a German myself, I wonder what language got confused ;) >> But seriously, >> with me affection only has me for the nice controls you have posted. >> Keep hanging in there! I really like them a lot!
" German form of Franciscus (see FRANCIS). This name was borne by the influential author Franz Kafka, writer of 'The Trial' and 'The Castle' among other works.
Also, rulers of Austria and the Holy Roman Empire have had this name. "