ANN: Few New wxPython Gadgets :-D

Hi All,

    I am happy to announce the release of few new wxPython custom
controls. During the work related to GUI2Exe, some new widgets have
popped up, and I'm releasing them together with the ones I have
developed over time but never released. I still have a couple of them
on hold, one because it has to be finished, the other one becaue I do
not want to be sued by Microsoft :smiley: :-D.

I have tested the new widgets *only* on Windows XP, Python 2.5.2,
wxPython 2.8.9.1 unicode.

Anyway, you will find source code, demo and epydoc-generated
documentation for all the widgets described below:

AquaButton

···

-----------------

AquaButton is another custom-drawn button class which *approximatively* mimics
the behaviour of Aqua buttons on the Mac. At the moment this class supports:

* Bubble and shadow effects;
* Customizable background, foreground and hover colours;
* Rounded-corners buttons;
* Text-only or image+text buttons;
* Pulse effect on gaining focus.

URL: http://xoomer.alice.it/infinity77/main/freeware.html#aquabutton

GenericMessageDialog
---------------------------------

This class represents a dialog that shows a single or multi-line message,
with a choice of OK, Yes, No and Cancel buttons. It is a possible replacement
for the standard wx.MessageDialog, with these extra functionalities:

* Possibility to modify the dialog position;
* Custom themed generic bitmap & text buttons;
* Possibility to set an icon to the dialog;
* More visibility to the button getting the focus;
* Good old Python code :smiley: .

URL: http://xoomer.alice.it/infinity77/main/freeware.html#genericmessagedialog

GradientButton
----------------------

GradientButton is another custom-drawn button class which mimics
Windows CE mobile
gradient buttons, using a tri-vertex blended gradient plus some ClearType bold
font (best effect with Tahoma Bold). GradientButton supports:

* Triple blended gradient background, with customizable colours;
* Custom colours for the "pressed" state;
* Rounded-corners buttons;
* Text-only or image+text buttons.

URL: http://xoomer.alice.it/infinity77/main/freeware.html#gradientbutton

MultiDirDialog
--------------------

This class represents a possible replacement for wx.DirDialog, with
the additional
ability of selecting multiple folders at once. It may be useful when you wish to
present to the user a directory browser which allows multiple folder selections.
MultiDirDialog sports the following features:

* Ability to select a single or mutliple folders, depending on the style passed;
* More colourful and eye-catching buttons;
* Good old Python code :smiley: .

URL: http://xoomer.alice.it/infinity77/main/freeware.html#multidirdialog

PeakMeterCtrl
---------------------

PeakMeterCtrl mimics the behaviour of equalizers that are usually
found in stereos
and MP3 players. This widgets supports:

* Vertical and horizontal led bands;
* Settings number of bands and leds per band;
* Possibility to change the colour for low/medium/high band frequencies;
* Falloff effects;
* Showing a background grid for the bands.

URL: http://xoomer.alice.it/infinity77/main/freeware.html#peakmeterctrl

SuperToolTip
-------------------

SuperToolTip is a class that mimics the behaviour of wx.TipWindow and
generic tooltip
windows, although it is a custom-drawn widget.
This class supports:

* Blended triple-gradient for the tooltip background;
* Header text and header image, with possibility to set the header
font indipendently;
* Footer text and footer image, with possibility to set the footer
font indipendently;
* Multiline text message in the tooltip body, plus an optional image
as "body image";
* Bold lines and hyperlink lines in the tooltip body;
* A wide set of predefined drawing styles for the tooltip background;
* Drawing of separator lines after the header and/or before the footer;
* Rounded corners and shadows below the tooltip window (Windows XP only);
* Fade in/fade out effects (Windows XP only);
* User-settable delays for the delay after which the tooltip appears
and the delay
  after which the tooltip is destroyed.

URL: http://xoomer.alice.it/infinity77/main/freeware.html#supertooltip

As usual, comments, bug reports, requests of enhancements (i.e.
patches :smiley: ) are more than welcome.

Enjoy, wxPython rules!

Andrea.

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

Andrea,

Hi All,

    I am happy to announce the release of few new wxPython custom
controls. During the work related to GUI2Exe, some new widgets have
popped up, and I'm releasing them together with the ones I have
developed over time but never released. I still have a couple of them
on hold, one because it has to be finished, the other one becaue I do
not want to be sued by Microsoft :smiley: :-D.

I have tested the new widgets *only* on Windows XP, Python 2.5.2,
wxPython 2.8.9.1 unicode.

Anyway, you will find source code, demo and epydoc-generated
documentation for all the widgets described below:

AquaButton
-----------------

AquaButton is another custom-drawn button class which *approximatively* mimics
the behaviour of Aqua buttons on the Mac. At the moment this class supports:

* Bubble and shadow effects;
* Customizable background, foreground and hover colours;
* Rounded-corners buttons;
* Text-only or image+text buttons;
* Pulse effect on gaining focus.

URL: http://xoomer.alice.it/infinity77/main/freeware.html#aquabutton

GenericMessageDialog
---------------------------------

This class represents a dialog that shows a single or multi-line message,
with a choice of OK, Yes, No and Cancel buttons. It is a possible replacement
for the standard wx.MessageDialog, with these extra functionalities:

* Possibility to modify the dialog position;
* Custom themed generic bitmap & text buttons;
* Possibility to set an icon to the dialog;
* More visibility to the button getting the focus;
* Good old Python code :smiley: .

URL: http://xoomer.alice.it/infinity77/main/freeware.html#genericmessagedialog

GradientButton
----------------------

GradientButton is another custom-drawn button class which mimics
Windows CE mobile
gradient buttons, using a tri-vertex blended gradient plus some ClearType bold
font (best effect with Tahoma Bold). GradientButton supports:

* Triple blended gradient background, with customizable colours;
* Custom colours for the "pressed" state;
* Rounded-corners buttons;
* Text-only or image+text buttons.

URL: http://xoomer.alice.it/infinity77/main/freeware.html#gradientbutton

MultiDirDialog
--------------------

This class represents a possible replacement for wx.DirDialog, with
the additional
ability of selecting multiple folders at once. It may be useful when you wish to
present to the user a directory browser which allows multiple folder selections.
MultiDirDialog sports the following features:

* Ability to select a single or mutliple folders, depending on the style passed;
* More colourful and eye-catching buttons;
* Good old Python code :smiley: .

URL: http://xoomer.alice.it/infinity77/main/freeware.html#multidirdialog

PeakMeterCtrl
---------------------

PeakMeterCtrl mimics the behaviour of equalizers that are usually
found in stereos
and MP3 players. This widgets supports:

* Vertical and horizontal led bands;
* Settings number of bands and leds per band;
* Possibility to change the colour for low/medium/high band frequencies;
* Falloff effects;
* Showing a background grid for the bands.

URL: http://xoomer.alice.it/infinity77/main/freeware.html#peakmeterctrl

SuperToolTip
-------------------

SuperToolTip is a class that mimics the behaviour of wx.TipWindow and
generic tooltip
windows, although it is a custom-drawn widget.
This class supports:

* Blended triple-gradient for the tooltip background;
* Header text and header image, with possibility to set the header
font indipendently;
* Footer text and footer image, with possibility to set the footer
font indipendently;
* Multiline text message in the tooltip body, plus an optional image
as "body image";
* Bold lines and hyperlink lines in the tooltip body;
* A wide set of predefined drawing styles for the tooltip background;
* Drawing of separator lines after the header and/or before the footer;
* Rounded corners and shadows below the tooltip window (Windows XP only);
* Fade in/fade out effects (Windows XP only);
* User-settable delays for the delay after which the tooltip appears
and the delay
  after which the tooltip is destroyed.

URL: http://xoomer.alice.it/infinity77/main/freeware.html#supertooltip

These widgets look pretty cool. I doubt I'll be using them for my current projects, but I hope I can stick some into some of my tutorials and future applications. I need to write some sample apps for our Python group and I think these widgets will be good examples.

FYI: "indipendently" should be spelled thusly: "independently".

As usual, comments, bug reports, requests of enhancements (i.e.
patches :smiley: ) are more than welcome.

Enjoy, wxPython rules!

Andrea.

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

Thanks again!

Mike

Andrea Gavana wrote:

<snip>

GradientButton
----------------------

GradientButton is another custom-drawn button class which mimics
Windows CE mobile
gradient buttons, using a tri-vertex blended gradient plus some ClearType bold
font (best effect with Tahoma Bold). GradientButton supports:

* Triple blended gradient background, with customizable colours;
* Custom colours for the "pressed" state;
* Rounded-corners buttons;
* Text-only or image+text buttons.

URL: http://xoomer.alice.it/infinity77/main/freeware.html#gradientbutton

That link doesn't jump down to the widget and neither does the link on the left. I'm sure it's something simple though...

Mike

Hi Mike,

···

On Wed, Oct 8, 2008 at 4:12 PM, Mike Driscoll wrote:

Andrea Gavana wrote:

<snip>

GradientButton
----------------------

GradientButton is another custom-drawn button class which mimics
Windows CE mobile
gradient buttons, using a tri-vertex blended gradient plus some ClearType
bold
font (best effect with Tahoma Bold). GradientButton supports:

* Triple blended gradient background, with customizable colours;
* Custom colours for the "pressed" state;
* Rounded-corners buttons;
* Text-only or image+text buttons.

URL: http://xoomer.alice.it/infinity77/main/freeware.html#gradientbutton

That link doesn't jump down to the widget and neither does the link on the
left. I'm sure it's something simple though...

Thanks Mike, I have fixed it :smiley:

Andrea.

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

Andrea Gavana wrote:

Hi All,

    I am happy to announce the release of few new wxPython custom
controls. During the work related to GUI2Exe, some new widgets have
popped up, and I'm releasing them together with the ones I have
developed over time but never released. I still have a couple of them
on hold, one because it has to be finished, the other one becaue I do
not want to be sued by Microsoft :smiley: :-D.

I have tested the new widgets *only* on Windows XP, Python 2.5.2,
wxPython 2.8.9.1 unicode.

Anyway, you will find source code, demo and epydoc-generated
documentation for all the widgets described below:

AquaButton
-----------------

AquaButton is another custom-drawn button class which *approximatively* mimics
the behaviour of Aqua buttons on the Mac. At the moment this class supports:

* Bubble and shadow effects;
* Customizable background, foreground and hover colours;
* Rounded-corners buttons;
* Text-only or image+text buttons;
* Pulse effect on gaining focus.

URL: http://xoomer.alice.it/infinity77/main/freeware.html#aquabutton
  
Just ran the demo for the AquaButton. I get the following traceback in my console window:

Traceback (most recent call last):
  File "C:\Documents and Settings\mld\Desktop\AquaButton\AquaButton.py", line 251, in OnPaint
    self._storedBitmap = wx.EmptyBitmapRGBA(width, height)
AttributeError: 'module' object has no attribute 'EmptyBitmapRGBA'

And when I mouse into the demo itself, the debug windows starts spewing this out:

Debug: ..\..\src\msw\dc.cpp(2338): 'BitBlt' failed with error 0x00000057 (the parameter is incorrect.).

The demo than locks up and I have to kill it with Task Manager.

GenericMessageDialog
---------------------------------

This class represents a dialog that shows a single or multi-line message,
with a choice of OK, Yes, No and Cancel buttons. It is a possible replacement
for the standard wx.MessageDialog, with these extra functionalities:

* Possibility to modify the dialog position;
* Custom themed generic bitmap & text buttons;
* Possibility to set an icon to the dialog;
* More visibility to the button getting the focus;
* Good old Python code :smiley: .

URL: http://xoomer.alice.it/infinity77/main/freeware.html#genericmessagedialog
  
Checking more than one checkbox in the GenericMessageDialog doesn't always have an effect. Maybe this should be a radio button set instead? One example is checking the top two checkboxes, which only creates a dialog with an OK button. I guess the wx.OK flag overrides the other one. The dialogs also mention wxPython 2.8.8.1 instead of 2.8.9.1, which is what you'd said you were using.

GradientButton
----------------------

GradientButton is another custom-drawn button class which mimics
Windows CE mobile
gradient buttons, using a tri-vertex blended gradient plus some ClearType bold
font (best effect with Tahoma Bold). GradientButton supports:

* Triple blended gradient background, with customizable colours;
* Custom colours for the "pressed" state;
* Rounded-corners buttons;
* Text-only or image+text buttons.

URL: http://xoomer.alice.it/infinity77/main/freeware.html#gradientbutton
  
This appears to work correctly on my machine.

MultiDirDialog
--------------------

This class represents a possible replacement for wx.DirDialog, with
the additional
ability of selecting multiple folders at once. It may be useful when you wish to
present to the user a directory browser which allows multiple folder selections.
MultiDirDialog sports the following features:

* Ability to select a single or mutliple folders, depending on the style passed;
* More colourful and eye-catching buttons;
* Good old Python code :smiley: .

URL: http://xoomer.alice.it/infinity77/main/freeware.html#multidirdialog

The help dialog doesn't work in the demo for this widget. Instead, it returns this traceback:

Traceback (most recent call last):
  File "MultiDirDialogDemo.py", line 143, in OnAbout
    dlg = wx.MessageDialog(self, _msg, "MultiDirDialog wxPython Demo",
NameError: global name '_msg' is not defined

Is wx.DD_NEW_DIR_BUTTON supposed to show the "Make New Folder" button? If so, then you must have it set to show that button by default as it's there regardless of whether or not I check that style.

PeakMeterCtrl
---------------------

PeakMeterCtrl mimics the behaviour of equalizers that are usually
found in stereos
and MP3 players. This widgets supports:

* Vertical and horizontal led bands;
* Settings number of bands and leds per band;
* Possibility to change the colour for low/medium/high band frequencies;
* Falloff effects;
* Showing a background grid for the bands.

URL: http://xoomer.alice.it/infinity77/main/freeware.html#peakmeterctrl
  
No comments...I didn't download this one...

SuperToolTip
-------------------

SuperToolTip is a class that mimics the behaviour of wx.TipWindow and
generic tooltip
windows, although it is a custom-drawn widget.
This class supports:

* Blended triple-gradient for the tooltip background;
* Header text and header image, with possibility to set the header
font indipendently;
* Footer text and footer image, with possibility to set the footer
font indipendently;
* Multiline text message in the tooltip body, plus an optional image
as "body image";
* Bold lines and hyperlink lines in the tooltip body;
* A wide set of predefined drawing styles for the tooltip background;
* Drawing of separator lines after the header and/or before the footer;
* Rounded corners and shadows below the tooltip window (Windows XP only);
* Fade in/fade out effects (Windows XP only);
* User-settable delays for the delay after which the tooltip appears
and the delay
  after which the tooltip is destroyed.

URL: http://xoomer.alice.it/infinity77/main/freeware.html#supertooltip
  
If I leave everything alone and tell it to generate a tooltip, it works great. If I check the "Rounded Corners And Drop Shadow" checkbox, generate the tooltip and hit the Big Test Button, I get the following in my console:

Traceback (most recent call last):
  File "C:\Python25\Lib\site-packages\wx-2.8-msw-unicode\wx\_misc.py", line 1341, in Notify
    self.notify()
  File "C:\Documents and Settings\mld\Desktop\SuperToolTip\SuperToolTip.py", line 834, in OnStartTimer
    self._superToolTip.DropShadow(self.GetDropShadow())
  File "C:\Documents and Settings\mld\Desktop\SuperToolTip\SuperToolTip.py", line 477, in DropShadow

    rgn = win32gui.CreateRoundRectRgn(0, 0, size.x, size.y, 9, 9)
AttributeError: 'module' object has no attribute 'CreateRoundRectRgn'

Other than that, my brief testing seems to show that everything else works...although I wasn't rigorous. This is a really cool tooltip generator, by the way!

As usual, comments, bug reports, requests of enhancements (i.e.
patches :smiley: ) are more than welcome.

Enjoy, wxPython rules!

Andrea.

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

I'm on Windows XP SP3 with Python 2.5.2 and wxPython 2.8.8.1 (msw-unicode). Maybe I just need to upgrade wx?

Mike

Mike Driscoll wrote:

Andrea Gavana wrote:

Hi All,

    I am happy to announce the release of few new wxPython custom
controls. During the work related to GUI2Exe, some new widgets have
popped up, and I'm releasing them together with the ones I have
developed over time but never released. I still have a couple of them
on hold, one because it has to be finished, the other one becaue I do
not want to be sued by Microsoft :smiley: :-D.

I have tested the new widgets *only* on Windows XP, Python 2.5.2,
wxPython 2.8.9.1 unicode.

Anyway, you will find source code, demo and epydoc-generated
documentation for all the widgets described below:

AquaButton
-----------------

AquaButton is another custom-drawn button class which *approximatively* mimics
the behaviour of Aqua buttons on the Mac. At the moment this class supports:

* Bubble and shadow effects;
* Customizable background, foreground and hover colours;
* Rounded-corners buttons;
* Text-only or image+text buttons;
* Pulse effect on gaining focus.

URL: http://xoomer.alice.it/infinity77/main/freeware.html#aquabutton
  
Just ran the demo for the AquaButton. I get the following traceback in my console window:

Traceback (most recent call last):
File "C:\Documents and Settings\mld\Desktop\AquaButton\AquaButton.py", line 251, in OnPaint
   self._storedBitmap = wx.EmptyBitmapRGBA(width, height)
AttributeError: 'module' object has no attribute 'EmptyBitmapRGBA'

And when I mouse into the demo itself, the debug windows starts spewing this out:

Debug: ..\..\src\msw\dc.cpp(2338): 'BitBlt' failed with error 0x00000057 (the parameter is incorrect.).

The demo than locks up and I have to kill it with Task Manager.

Upgrading to 2.8.9.1 fixed this one...

GenericMessageDialog
---------------------------------

This class represents a dialog that shows a single or multi-line message,
with a choice of OK, Yes, No and Cancel buttons. It is a possible replacement
for the standard wx.MessageDialog, with these extra functionalities:

* Possibility to modify the dialog position;
* Custom themed generic bitmap & text buttons;
* Possibility to set an icon to the dialog;
* More visibility to the button getting the focus;
* Good old Python code :smiley: .

URL: http://xoomer.alice.it/infinity77/main/freeware.html#genericmessagedialog

Checking more than one checkbox in the GenericMessageDialog doesn't always have an effect. Maybe this should be a radio button set instead? One example is checking the top two checkboxes, which only creates a dialog with an OK button. I guess the wx.OK flag overrides the other one. The dialogs also mention wxPython 2.8.8.1 instead of 2.8.9.1, which is what you'd said you were using.

Hmmm...it seems your apps were grabbing my wx version, so just ignore that note...

<snip>

SuperToolTip
-------------------

SuperToolTip is a class that mimics the behaviour of wx.TipWindow and
generic tooltip
windows, although it is a custom-drawn widget.
This class supports:

* Blended triple-gradient for the tooltip background;
* Header text and header image, with possibility to set the header
font indipendently;
* Footer text and footer image, with possibility to set the footer
font indipendently;
* Multiline text message in the tooltip body, plus an optional image
as "body image";
* Bold lines and hyperlink lines in the tooltip body;
* A wide set of predefined drawing styles for the tooltip background;
* Drawing of separator lines after the header and/or before the footer;
* Rounded corners and shadows below the tooltip window (Windows XP only);
* Fade in/fade out effects (Windows XP only);
* User-settable delays for the delay after which the tooltip appears
and the delay
  after which the tooltip is destroyed.

URL: http://xoomer.alice.it/infinity77/main/freeware.html#supertooltip
  
If I leave everything alone and tell it to generate a tooltip, it works great. If I check the "Rounded Corners And Drop Shadow" checkbox, generate the tooltip and hit the Big Test Button, I get the following in my console:

Traceback (most recent call last):
File "C:\Python25\Lib\site-packages\wx-2.8-msw-unicode\wx\_misc.py", line 1341, in Notify
   self.notify()
File "C:\Documents and Settings\mld\Desktop\SuperToolTip\SuperToolTip.py", line 834, in OnStartTimer
   self._superToolTip.DropShadow(self.GetDropShadow())
File "C:\Documents and Settings\mld\Desktop\SuperToolTip\SuperToolTip.py", line 477, in DropShadow

   rgn = win32gui.CreateRoundRectRgn(0, 0, size.x, size.y, 9, 9)
AttributeError: 'module' object has no attribute 'CreateRoundRectRgn'

Other than that, my brief testing seems to show that everything else works...although I wasn't rigorous. This is a really cool tooltip generator, by the way!

Upgrading had no effect on this issue...

As usual, comments, bug reports, requests of enhancements (i.e.
patches :smiley: ) are more than welcome.

Enjoy, wxPython rules!

Andrea.

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

Thanks for all your hard work!

···

-------------------
Mike Driscoll

Blog: http://blog.pythonlibrary.org
Python Extension Building Network: http://www.pythonlibrary.org

Hi Mike,

Mike Driscoll wrote:

Just ran the demo for the AquaButton. I get the following traceback in my
console window:

Traceback (most recent call last):
File "C:\Documents and Settings\mld\Desktop\AquaButton\AquaButton.py",
line 251, in OnPaint
  self._storedBitmap = wx.EmptyBitmapRGBA(width, height)
AttributeError: 'module' object has no attribute 'EmptyBitmapRGBA'

And when I mouse into the demo itself, the debug windows starts spewing
this out:

Debug: ..\..\src\msw\dc.cpp(2338): 'BitBlt' failed with error 0x00000057
(the parameter is incorrect.).

The demo than locks up and I have to kill it with Task Manager.

Upgrading to 2.8.9.1 fixed this one...

Yes, wx.EmptyBitmapRGBA was added in wxPython 2.8.9.0, I should really
put a check in the demo to ensure the right wxPython version is
present. I'll fix it, thanks.

Checking more than one checkbox in the GenericMessageDialog doesn't always
have an effect. Maybe this should be a radio button set instead? One example
is checking the top two checkboxes, which only creates a dialog with an OK
button. I guess the wx.OK flag overrides the other one. The dialogs also
mention wxPython 2.8.8.1 instead of 2.8.9.1, which is what you'd said you
were using.

Hmmm...it seems your apps were grabbing my wx version, so just ignore that
note...

Yes, I am just taking your wx.VERSION_STRING to build the message string.

If I leave everything alone and tell it to generate a tooltip, it works
great. If I check the "Rounded Corners And Drop Shadow" checkbox, generate
the tooltip and hit the Big Test Button, I get the following in my console:

Traceback (most recent call last):
File "C:\Python25\Lib\site-packages\wx-2.8-msw-unicode\wx\_misc.py", line
1341, in Notify
  self.notify()
File "C:\Documents and
Settings\mld\Desktop\SuperToolTip\SuperToolTip.py", line 834, in
OnStartTimer
  self._superToolTip.DropShadow(self.GetDropShadow())
File "C:\Documents and
Settings\mld\Desktop\SuperToolTip\SuperToolTip.py", line 477, in DropShadow

  rgn = win32gui.CreateRoundRectRgn(0, 0, size.x, size.y, 9, 9)
AttributeError: 'module' object has no attribute 'CreateRoundRectRgn'

Other than that, my brief testing seems to show that everything else
works...although I wasn't rigorous. This is a really cool tooltip generator,
by the way!

Upgrading had no effect on this issue...

This is dependent on the win32all version you have installed... I have
pywin32 build 212 on my PCs, and everything works fine. I don't know
when CreateRoundRectRgn was added, but I need to find it out in order
to let SuperToolTip work correctly.

Thanks for all your hard work!

Thanks to you for the testing, it is very appreciated!

Andrea.

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

···

On Wed, Oct 8, 2008 at 7:07 PM, Mike Driscoll wrote:

Hi Andrea,

Thanks for releasing all these widgets!

SuperToolTip
-------------------

SuperToolTip is a class that mimics the behaviour of wx.TipWindow and
generic tooltip
windows, although it is a custom-drawn widget.

As it turns out, I was going to have to create something like this
*today*, so your timing was most excellent.

I'm happy to report this one works great both on Linux and Windows. A
few minor nits:

* The header bitmap (and the body and footer bitmaps too) don't handle
transparency properly. This is a quick fix: on lines 260, 328, 357
and the dc.DrawBitmap calls should have a 'True' appended to the end.
* The header and footer fonts cannot be changed, despite using
SetFooterFont() etc. As it's currently coded, the ToolTipWindow
object is created when the start timer fires. However, the
'SetFooterFont()' modifies self._footerFont of the SuperToolTip
object. Of course, when SetFooterFont() is called, the ToolTipWindow
doesn't exist yet. So, after the ToolTipWindow initializes all its
fonts, it doesn't override them with the user-set values. I've coded
a stop-gap fix for this, but I don't know what other things might be
similarly affected.

FWIW, I've also used your ExtendedChoice control too but I've hacked
it up quite a bit for our purposes. But, a big *Thank You* for your
ongoing work on these controls!

Anthony.

Andrea,

  

If I leave everything alone and tell it to generate a tooltip, it works
great. If I check the "Rounded Corners And Drop Shadow" checkbox, generate
the tooltip and hit the Big Test Button, I get the following in my console:

Traceback (most recent call last):
File "C:\Python25\Lib\site-packages\wx-2.8-msw-unicode\wx\_misc.py", line
1341, in Notify
  self.notify()
File "C:\Documents and
Settings\mld\Desktop\SuperToolTip\SuperToolTip.py", line 834, in
OnStartTimer
  self._superToolTip.DropShadow(self.GetDropShadow())
File "C:\Documents and
Settings\mld\Desktop\SuperToolTip\SuperToolTip.py", line 477, in DropShadow

  rgn = win32gui.CreateRoundRectRgn(0, 0, size.x, size.y, 9, 9)
AttributeError: 'module' object has no attribute 'CreateRoundRectRgn'

Other than that, my brief testing seems to show that everything else
works...although I wasn't rigorous. This is a really cool tooltip generator,
by the way!

Upgrading had no effect on this issue...
    
This is dependent on the win32all version you have installed... I have
pywin32 build 212 on my PCs, and everything works fine. I don't know
when CreateRoundRectRgn was added, but I need to find it out in order
to let SuperToolTip work correctly.

Hmmm...the "pywin32.version.txt" says I have 210, but Windows Add/Remove utility says I have 211. I thought I had 212, but that must be one of my other machines. I'll upgrade this one too.

Thanks. I knew it would be something simple.

Mike

Hi Mike and Anthony and All,

Just ran the demo for the AquaButton. I get the following traceback in my
console window:

Traceback (most recent call last):
File "C:\Documents and Settings\mld\Desktop\AquaButton\AquaButton.py", line
251, in OnPaint
  self._storedBitmap = wx.EmptyBitmapRGBA(width, height)
AttributeError: 'module' object has no attribute 'EmptyBitmapRGBA'

I think I have fixed this one, simply by raising an exception if the
wxPython version is not greater than 2.8.9.0. Not a big fix, but there
is nothing I can do about the EmptyBitmapRGBA issue...

Checking more than one checkbox in the GenericMessageDialog doesn't always
have an effect. Maybe this should be a radio button set instead? One example
is checking the top two checkboxes, which only creates a dialog with an OK
button. I guess the wx.OK flag overrides the other one.

Yes, this is also what the standard wx.MessageDialog does. If you pass
this style to wx.MessageDialog:

style = wx.OK | wx.CANCEL | wx.YES_NO | wx.NO_DEFAULT

You'll see that the native dialog shows only the OK and Cancel button.
However, I have tweaked the demo a bit to automatically uncheck

MultiDirDialog
--------------------

The help dialog doesn't work in the demo for this widget. Instead, it
returns this traceback:

Traceback (most recent call last):
File "MultiDirDialogDemo.py", line 143, in OnAbout
  dlg = wx.MessageDialog(self, _msg, "MultiDirDialog wxPython Demo",
NameError: global name '_msg' is not defined

Thank you, fixed.

Is wx.DD_NEW_DIR_BUTTON supposed to show the "Make New Folder" button? If
so, then you must have it set to show that button by default as it's there
regardless of whether or not I check that style.

Yes, it's always there except when you explicitely ask for
wx.DD_DIR_MUST_EXIST, which forces the user to choose a folder that
already exists. This is the standard behaviour of the native DirDialog
too, as far as I know.

SuperToolTip
-------------------

If I leave everything alone and tell it to generate a tooltip, it works
great. If I check the "Rounded Corners And Drop Shadow" checkbox, generate
the tooltip and hit the Big Test Button, I get the following in my console:

Traceback (most recent call last):
File "C:\Python25\Lib\site-packages\wx-2.8-msw-unicode\wx\_misc.py", line
1341, in Notify
  self.notify()
File "C:\Documents and Settings\mld\Desktop\SuperToolTip\SuperToolTip.py",
line 834, in OnStartTimer
  self._superToolTip.DropShadow(self.GetDropShadow())
File "C:\Documents and Settings\mld\Desktop\SuperToolTip\SuperToolTip.py",
line 477, in DropShadow

  rgn = win32gui.CreateRoundRectRgn(0, 0, size.x, size.y, 9, 9)
AttributeError: 'module' object has no attribute 'CreateRoundRectRgn'

Thanks, I have fixed this by checking if win32gui has the
CreateRoundRectRgn attribute, otherwise I skip this part.

Anthony Floyd wrote:

* The header bitmap (and the body and footer bitmaps too) don't handle
transparency properly. This is a quick fix: on lines 260, 328, 357
and the dc.DrawBitmap calls should have a 'True' appended to the end.

Thanks, fixed now.

* The header and footer fonts cannot be changed, despite using
SetFooterFont() etc. As it's currently coded, the ToolTipWindow
object is created when the start timer fires. However, the
'SetFooterFont()' modifies self._footerFont of the SuperToolTip
object. Of course, when SetFooterFont() is called, the ToolTipWindow
doesn't exist yet. So, after the ToolTipWindow initializes all its
fonts, it doesn't override them with the user-set values. I've coded
a stop-gap fix for this, but I don't know what other things might be
similarly affected.

Thank you, I have just overlooked this bug... I think it should be fixed now.

Thanks to you all for the testing!

Andrea.

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

···

On Wed, Oct 8, 2008 at 6:56 PM, Mike Driscoll wrote: