wxPython 2.9.1.1 20101001 Preview build

Hi all,

Another preview build for 2.9.1.1 just finished uploading, you can fetch it here:

  http://wxpython.wxcommunity.com/preview/20101001/

This build addresses most of the bugs reported here for the last build.

Here's a useless factoid for you: The size of the collection of wxPython preview build files is about 3 times the combined capacity of the first 3 hard drives I owned.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org

Hi Robin,

Hi all,

Another preview build for 2.9.1.1 just finished uploading, you can fetch it
here:

   http://wxpython.wxcommunity.com/preview/20101001/

This build addresses most of the bugs reported here for the last build.

Thanks for the very quick job of putting out another pre-release (and
for the fixes on the AGW demos in SVN). These are my findings up to
now, which are probably only AGW-related, but you'll be able to
pinpoint what has changed between 2.8 and 2.9 and possibly suggest a
fix.

- AUI:
The first time I float a pane, I get the "wxWidgets Debug Alert"
message attached as image. If I click on the "Cancel" button, it never
comes up again. Does 2.9 require explicit destruction of a pushed
event handler now?

- ButtonPanel:
I guess the syntax of wx.MenuItem.GetLabel() has changed in 2.9, as
when I choose the ButtonPanel alignment from the menu in the demo I
get:
Traceback (most recent call last):
  File "E:\AGW\demos\ButtonPanel.py", line 758, in OnAlignment
    alignment = getattr(bp, item.GetLabel())
  File "C:\Python25\Lib\site-packages\wx-2.9.1-msw\wx\_core.py", line
12313, in GetLabelText
    return _core_.MenuItem_GetLabelText(*args, **kwargs)
TypeError: MenuItem_GetLabelText() takes exactly 1 argument (0 given)

This should be easy to fix, hopefully 2.9 and 2.8 will have a common
method (GetItemLabelText?) for the same purpose.

- CustomTreeCtrl:
The issue of DrawRadioButton/DrawRadioBitmap should be fixed in SVN.

- FlatMenu:
The same "wxWidgets Debug Alert" message I got from AUI shows up in
FlatMenu as well, but only when I close the demo (!?).

- FloatSpin:
The widget doesn't show the spinbutton anymore (in 2.8 it's OK). That
might be another wx.Sizer change made by wxWidgets dev, but it's a
pain to track it down.

- HyperTreeList:
The same "wxWidgets Debug Alert" message I got from AUI shows up in
HyperTreeList as well, but only when I close the demo (!?).

- SuperToolTip:
When I include an image in the message body (as an option in the
demo), the layout is all messed up (although is a bit messed up even
in 2.8, but just a little, not so much...). As I get weird line
heights also in the UltimateListCtrl header, does anyone know if
something has changed in the font/text measuring since 2.8?

- ToasterBox:
More or less as SuperToolTip, although not so messy (and only on
Windows 7, it appears, and only with the TB_COMPLEX style) (???)

- UltimateListCtrl:
I fixed various DeprecationWarnings, although the header height in
report mode is too narrow and the selected item in the wx.LC_ICON mode
is almost invisible. These 2 issues were not present in 2.8.

I'll take a look at all the other demos tomorrow, thank you again for
the super fast pre-release!

Here's a useless factoid for you: The size of the collection of wxPython
preview build files is about 3 times the combined capacity of the first 3
hard drives I owned.

It might be because wxPython has got so many more users now :slight_smile:

Andrea.

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

==> Never *EVER* use RemovalGroup for your house removal. You'll
regret it forever.
The Doomed City: Removal Group: the nightmare <==

···

On 1 October 2010 21:34, Robin Dunn <robin@alldunn.com> wrote:

Apologies, I forgot the attachment...

Andrea.

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

==> Never *EVER* use RemovalGroup for your house removal. You'll
regret it forever.
The Doomed City: Removal Group: the nightmare <==

···

On 2 October 2010 00:00, Andrea Gavana wrote:

- AUI:
The first time I float a pane, I get the "wxWidgets Debug Alert"
message attached as image. If I click on the "Cancel" button, it never
comes up again. Does 2.9 require explicit destruction of a pushed
event handler now?

Hi,

Hi Robin,

Hi all,

This should be easy to fix, hopefully 2.9 and 2.8 will have a common
method (GetItemLabelText?) for the same purpose.

This is a little messy, I remember running into it a while back when
working with older builds of 2.9. The meanings of what each of the
methods do has also changed a bit.

GetItemLabelText and GetItemLabel where added to wxPython in 2.8.6.0.

GetText is not available in 2.9, So in my code I added some hacks to
make the code more compatible between versions.

"""
if wx.VERSION < (2, 8, 6, 0, ''):
    wx.MenuItem.GetItemLabel = wx.MenuItem.GetText
    wx.MenuItem.GetItemLabelText = wx.MenuItem.GetLabel
"""

Cody

···

On Fri, Oct 1, 2010 at 4:00 PM, Andrea Gavana <andrea.gavana@gmail.com> wrote:

On 1 October 2010 21:34, Robin Dunn <robin@alldunn.com> wrote:

The uninstaller of 2.9.1.1.b20100922 does not remove
the branch \wx-2.9.1-msw\wx\tools\Editra or something
like this. This leads to a living non empty
\site-packages\wx-2.9.1-msw dir after an uninstall.

I see a hard crash on this one when I use the demo and use the masked control, i.e. open the demo "MaskedEditControl" select the tab "Other Masked Controls" and close the demo.

On Py 2.6.5 32 bit on Windows 7 64 bit

Werner

···

On 01/10/2010 20:34, Robin Dunn wrote:

Hi all,

Another preview build for 2.9.1.1 just finished uploading, you can fetch it here:

    NameBright - Coming Soon

This build addresses most of the bugs reported here for the last build.

Here's a useless factoid for you: The size of the collection of wxPython preview build files is about 3 times the combined capacity of the first 3 hard drives I owned.

After a deeper testing, my conclusion about this release.

The wxPython port of wxWidgets is in good shape, unfortunately
it relies on a wxWidgets version (2.9.1) which is as good as
one can expect.

Compared to the latest 2.8, there are in my mind a few
very annoying regressions.

jmf

···

On 1 oct, 20:34, Robin Dunn <ro...@alldunn.com> wrote:

Hi all,

Another preview build for 2.9.1.1 just finished uploading, you can fetch
it here:

   http://wxpython.wxcommunity.com/preview/20101001/

This build addresses most of the bugs reported here for the last build.

I am getting following exception:

**** Mon Oct 04 17:53:36 2010 **** Version: 3.2.113.1 **** wxV: 2.9.1.1.b20101001 (msw-unicode) *****
Traceback (most recent call last):
   File "C:\dev\TwcbBranchesV32\Program\twcbF.py", line 1637, in OnPrintingCBookCellarbookMenu
     title = self.GetMenuBar().FindItemById(event.GetId()).GetLabel()
   File "C:\Python26\lib\site-packages\wx-2.9.1-msw\wx\_core.py", line 12313, in GetLabelText
     return _core_.MenuItem_GetLabelText(*args, **kwargs)
TypeError: Required argument 'label' (pos 1) not found

Looks like "GetLabel" is "mapped" to GetLabelText in 2.9 - is this an expected change?

Werner

···

On 01/10/2010 20:34, Robin Dunn wrote:

Hi all,

Another preview build for 2.9.1.1 just finished uploading, you can fetch it here:

    NameBright - Coming Soon

This build addresses most of the bugs reported here for the last build.

Here's a useless factoid for you: The size of the collection of wxPython preview build files is about 3 times the combined capacity of the first 3 hard drives I owned.

Hi,

···

On Mon, Oct 4, 2010 at 11:06 AM, werner <wbruhin@free.fr> wrote:

On 01/10/2010 20:34, Robin Dunn wrote:

Hi all,

Another preview build for 2.9.1.1 just finished uploading, you can fetch
it here:

NameBright - Coming Soon

This build addresses most of the bugs reported here for the last build.

Here's a useless factoid for you: The size of the collection of wxPython
preview build files is about 3 times the combined capacity of the first 3
hard drives I owned.

I am getting following exception:

**** Mon Oct 04 17:53:36 2010 **** Version: 3.2.113.1 **** wxV:
2.9.1.1.b20101001 (msw-unicode) *****
Traceback (most recent call last):
File "C:\dev\TwcbBranchesV32\Program\twcbF.py", line 1637, in
OnPrintingCBookCellarbookMenu
title = self.GetMenuBar().FindItemById(event.GetId()).GetLabel()
File "C:\Python26\lib\site-packages\wx-2.9.1-msw\wx\_core.py", line 12313,
in GetLabelText
return _core_.MenuItem_GetLabelText(*args, **kwargs)
TypeError: Required argument 'label' (pos 1) not found

Looks like "GetLabel" is "mapped" to GetLabelText in 2.9 - is this an
expected change?

I think that I had responded to about this earlier, but this also
snagged me up last year when i was doing some testing with 2.9. The
changes appear to be the following.

wx.MenuItem.GetItemLabel = wx.MenuItem.GetText
wx.MenuItem.GetItemLabelText = wx.MenuItem.GetLabel

Cody

IIRC there were new methods added and old ones deprecated or removed. I added these aliases to try and preserve some backwards compatibility:

     %pythoncode {
         GetLabel = GetLabelText
         GetText = GetItemLabel
         SetText = SetItemLabel
     }

The C++ methods are now declared like this:

     // the item's text (or name)
     //
     // NB: the item's text includes the accelerators and mnemonics info (if
     // any), i.e. it may contain '&' or '_' or "\t..." and thus is
     // different from the item's label which only contains the text shown
     // in the menu
     virtual void SetItemLabel(const wxString& str);

     // return the item label including any mnemonics and accelerators.
     // This used to be called GetText.
     virtual wxString GetItemLabel() const;

     // return just the text of the item label, without any mnemonics
     // This used to be called GetLabel.
     virtual wxString GetItemLabelText() const;

     // return just the text part of the given label (implemented in platform-specific code)
     // This used to be called GetLabelFromText.
     static wxString GetLabelText(const wxString& label);

···

On 10/4/10 9:13 AM, Cody Precord wrote:

Hi,

On Mon, Oct 4, 2010 at 11:06 AM, werner<wbruhin@free.fr> wrote:

  On 01/10/2010 20:34, Robin Dunn wrote:

Hi all,

Another preview build for 2.9.1.1 just finished uploading, you can fetch
it here:

    NameBright - Coming Soon

This build addresses most of the bugs reported here for the last build.

Here's a useless factoid for you: The size of the collection of wxPython
preview build files is about 3 times the combined capacity of the first 3
hard drives I owned.

I am getting following exception:

**** Mon Oct 04 17:53:36 2010 **** Version: 3.2.113.1 **** wxV:
2.9.1.1.b20101001 (msw-unicode) *****
Traceback (most recent call last):
  File "C:\dev\TwcbBranchesV32\Program\twcbF.py", line 1637, in
OnPrintingCBookCellarbookMenu
    title = self.GetMenuBar().FindItemById(event.GetId()).GetLabel()
  File "C:\Python26\lib\site-packages\wx-2.9.1-msw\wx\_core.py", line 12313,
in GetLabelText
    return _core_.MenuItem_GetLabelText(*args, **kwargs)
TypeError: Required argument 'label' (pos 1) not found

Looks like "GetLabel" is "mapped" to GetLabelText in 2.9 - is this an
expected change?

I think that I had responded to about this earlier, but this also
snagged me up last year when i was doing some testing with 2.9. The
changes appear to be the following.

wx.MenuItem.GetItemLabel = wx.MenuItem.GetText
wx.MenuItem.GetItemLabelText = wx.MenuItem.GetLabel

--
Robin Dunn
Software Craftsman

Hmmm... Looking at this again it seems that it should be something like this instead of just an alias:

  def GetLabel(self):
    return wx.MenuItem.GetLabelText(self.GetItemText())

···

On 10/4/10 10:08 AM, Robin Dunn wrote:

On 10/4/10 9:13 AM, Cody Precord wrote:

Hi,

On Mon, Oct 4, 2010 at 11:06 AM, werner<wbruhin@free.fr> wrote:

On 01/10/2010 20:34, Robin Dunn wrote:

Hi all,

Another preview build for 2.9.1.1 just finished uploading, you can
fetch
it here:

NameBright - Coming Soon

This build addresses most of the bugs reported here for the last build.

Here's a useless factoid for you: The size of the collection of
wxPython
preview build files is about 3 times the combined capacity of the
first 3
hard drives I owned.

I am getting following exception:

**** Mon Oct 04 17:53:36 2010 **** Version: 3.2.113.1 **** wxV:
2.9.1.1.b20101001 (msw-unicode) *****
Traceback (most recent call last):
File "C:\dev\TwcbBranchesV32\Program\twcbF.py", line 1637, in
OnPrintingCBookCellarbookMenu
title = self.GetMenuBar().FindItemById(event.GetId()).GetLabel()
File "C:\Python26\lib\site-packages\wx-2.9.1-msw\wx\_core.py", line
12313,
in GetLabelText
return _core_.MenuItem_GetLabelText(*args, **kwargs)
TypeError: Required argument 'label' (pos 1) not found

Looks like "GetLabel" is "mapped" to GetLabelText in 2.9 - is this an
expected change?

I think that I had responded to about this earlier, but this also
snagged me up last year when i was doing some testing with 2.9. The
changes appear to be the following.

wx.MenuItem.GetItemLabel = wx.MenuItem.GetText
wx.MenuItem.GetItemLabelText = wx.MenuItem.GetLabel

IIRC there were new methods added and old ones deprecated or removed. I
added these aliases to try and preserve some backwards compatibility:

%pythoncode {
GetLabel = GetLabelText
GetText = GetItemLabel
SetText = SetItemLabel
}

--
Robin Dunn
Software Craftsman

Hi Robin,

Hi all,

Another preview build for 2.9.1.1 just finished uploading, you can fetch it
here:

        NameBright - Coming Soon

This build addresses most of the bugs reported here for the last build.

Thanks for the very quick job of putting out another pre-release (and
for the fixes on the AGW demos in SVN). These are my findings up to
now, which are probably only AGW-related, but you'll be able to
pinpoint what has changed between 2.8 and 2.9 and possibly suggest a
fix.

- AUI:
The first time I float a pane, I get the "wxWidgets Debug Alert"
message attached as image. If I click on the "Cancel" button, it never
comes up again. Does 2.9 require explicit destruction of a pushed
event handler now?

Yes. IIRC there was a change made (that seemed rather silly to me) that allows the same instance of a wx.EvtHandler to be pushed onto more than one window, or something like that. That means that the window doesn't own them anymore and can't clean them up itself when it is destroyed.

- ButtonPanel:
I guess the syntax of wx.MenuItem.GetLabel() has changed in 2.9, as
when I choose the ButtonPanel alignment from the menu in the demo I
get:
Traceback (most recent call last):
   File "E:\AGW\demos\ButtonPanel.py", line 758, in OnAlignment
     alignment = getattr(bp, item.GetLabel())
   File "C:\Python25\Lib\site-packages\wx-2.9.1-msw\wx\_core.py", line
12313, in GetLabelText
     return _core_.MenuItem_GetLabelText(*args, **kwargs)
TypeError: MenuItem_GetLabelText() takes exactly 1 argument (0 given)

This should be easy to fix, hopefully 2.9 and 2.8 will have a common
method (GetItemLabelText?) for the same purpose.

See my other messages about the menu item changes. If you can test with my proposed change for GetLabel it would be great.

- FlatMenu:
The same "wxWidgets Debug Alert" message I got from AUI shows up in
FlatMenu as well, but only when I close the demo (!?).

This is likely the same problem, it's just not manifested until the window with the pushed evthandler is destroyed.

>

- FloatSpin:
The widget doesn't show the spinbutton anymore (in 2.8 it's OK). That
might be another wx.Sizer change made by wxWidgets dev, but it's a
pain to track it down.

The good news is that the change in 2.9.0 that screwed up certain uses of BoxSizers has been reverted, and I think a different solution to the original problem was implemented. So that should help reduce some of the confusion at least.

For this case after playing around with the FloatSpin in the WIT I see that the text widget has no minsize set and the best size has a width of 100. The spin button has a best size width of 16. However the problem comes when the size of the FLoatSpin is set to smaller than sum of the two values (the one in the demo I was looking at had minsize = (95, 30) and bestsize = (127, 30)) so the sizer lays out the text widget and then has no room left in the visible space for the spin button. Using a proportion or 1 for the text widget in the FloatSpin's sizer takes care of the problem.

- HyperTreeList:
The same "wxWidgets Debug Alert" message I got from AUI shows up in
HyperTreeList as well, but only when I close the demo (!?).

Same as above.

- SuperToolTip:
When I include an image in the message body (as an option in the
demo), the layout is all messed up (although is a bit messed up even
in 2.8, but just a little, not so much...). As I get weird line
heights also in the UltimateListCtrl header, does anyone know if
something has changed in the font/text measuring since 2.8?

It looks okay here (tested on Mac and XP) although I suppose it's possible that I'm just not noticing the glitch that you are seeing because I'm less familiar with this class. As long as you've got a valid DC I think that text measuring should work the same as before, I don't remember any changes that would affect that.

- ToasterBox:
More or less as SuperToolTip, although not so messy (and only on
Windows 7, it appears, and only with the TB_COMPLEX style) (???)

Ditto

- UltimateListCtrl:
I fixed various DeprecationWarnings, although the header height in
report mode is too narrow

Ditto.

and the selected item in the wx.LC_ICON mode
is almost invisible. These 2 issues were not present in 2.8.

Are you using SystemSettings for both the selected background and foreground? It looks to me like it is using the incorrect bg color.

···

On 10/1/10 2:00 PM, Andrea Gavana wrote:

On 1 October 2010 21:34, Robin Dunn<robin@alldunn.com> wrote:

--
Robin Dunn
Software Craftsman

Actually, I've recently been thinking that XRCed and Editra probably do not belong in the wx.tools package, and should probably be separated from the wxPython runtime installers. Currently the only thing installed for them by the various "Docs, Demo, Samples, Tools" installer/package/disk-image is a a start menu shortcut where appropriate and a simple script that imports from wx.tools which was already installed with the runtime, and runs a main() in that module.

However I'm not sure what the next step should be. Should they still be installed as source so they can be used as examples as well as tools? Does that make sense for all platforms or should we use py2exe and py2app for Windows and Mac? If so should they still be installed as part of one of the wxPython installers or should each have their own? (Editra already does have its own from editra.org.)

Suggestions and/or volunteers are welcome.

···

On 10/2/10 1:46 AM, jmfauth wrote:

The uninstaller of 2.9.1.1.b20100922 does not remove
the branch \wx-2.9.1-msw\wx\tools\Editra or something
like this. This leads to a living non empty
\site-packages\wx-2.9.1-msw dir after an uninstall.

--
Robin Dunn
Software Craftsman

Hi Robin,

The uninstaller of 2.9.1.1.b20100922 does not remove
the branch \wx-2.9.1-msw\wx\tools\Editra or something
like this. This leads to a living non empty
\site-packages\wx-2.9.1-msw dir after an uninstall.

Actually, I've recently been thinking that XRCed and Editra probably do not belong in the wx.tools package, and should probably be separated from the wxPython runtime installers. Currently the only thing installed for them by the various "Docs, Demo, Samples, Tools" installer/package/disk-image is a a start menu shortcut where appropriate and a simple script that imports from wx.tools which was already installed with the runtime, and runs a main() in that module.

However I'm not sure what the next step should be. Should they still be installed as source so they can be used as examples as well as tools? Does that make sense for all platforms or should we use py2exe and py2app for Windows and Mac? If so should they still be installed as part of one of the wxPython installers or should each have their own? (Editra already does have its own from editra.org.)

Suggestions and/or volunteers are welcome.

I think the best way to look at them from a user's point of view is as the "developer tools" for building wxPython apps, ala XCode and Interface Builder or MSVS.

I think wxPython should move to a setup of "runtime only" and "runtime + developer tools" packages (docs + samples + tools), or even just offer the latter for user installs unless people complain. (Obviously for OS installs just the runtime would need to be an option.) Personally, I actually don't like the separate packages approach because I always forget to update the demos but in my mind I think that I've updated everything. Since new modules, etc. get added even in point releases, at times I'm probably not even seeing new modules that could help me out.

I also think that, after install, it'd be pretty cool to have the option to pop up a "getting started" tutorial that walked you through a "Hello World" GUI using those tools. I wish I had time to volunteer for some of this, but I'm pretty swamped right now. Just thought I'd throw it out there in case there are some volunteers that are looking for something fun to do. :slight_smile:

Regards,

Kevin

···

On Oct 4, 2010, at 4:44 PM, Robin Dunn wrote:

On 10/2/10 1:46 AM, jmfauth wrote:

--
Robin Dunn
Software Craftsman
http://wxPython.org

--
To unsubscribe, send email to wxPython-dev+unsubscribe@googlegroups.com
or visit http://groups.google.com/group/wxPython-dev?hl=en

To Werner,

Would you be so kind and test the the code I submitted
in the thread:

wxPy2911preview - default font size - wxWidgets

jmf

Hi Robin,

....

I think that I had responded to about this earlier, but this also
snagged me up last year when i was doing some testing with 2.9. The
changes appear to be the following.

wx.MenuItem.GetItemLabel = wx.MenuItem.GetText
wx.MenuItem.GetItemLabelText = wx.MenuItem.GetLabel

IIRC there were new methods added and old ones deprecated or removed. I added these aliases to try and preserve some backwards compatibility:

    %pythoncode {
        GetLabel = GetLabelText
        GetText = GetItemLabel
        SetText = SetItemLabel
    }

The C++ methods are now declared like this:

In 2.8 "GetLabel" doc states:
Returns the text associated with the menu item without any accelerator characters it might contain.

Based on the info below shouldn't above then read "Getlabel = GetItemLabelText" ?

Werner

···

On 04/10/2010 19:08, Robin Dunn wrote:

On 10/4/10 9:13 AM, Cody Precord wrote:
    // the item's text (or name)
    //
    // NB: the item's text includes the accelerators and mnemonics info (if
    // any), i.e. it may contain '&' or '_' or "\t..." and thus is
    // different from the item's label which only contains the text shown
    // in the menu
    virtual void SetItemLabel(const wxString& str);

    // return the item label including any mnemonics and accelerators.
    // This used to be called GetText.
    virtual wxString GetItemLabel() const;

    // return just the text of the item label, without any mnemonics
    // This used to be called GetLabel.
    virtual wxString GetItemLabelText() const;

    // return just the text part of the given label (implemented in platform-specific code)
    // This used to be called GetLabelFromText.
    static wxString GetLabelText(const wxString& label);

...

%pythoncode {
GetLabel = GetLabelText
GetText = GetItemLabel
SetText = SetItemLabel
}

Hmmm... Looking at this again it seems that it should be something like this instead of just an alias:

    def GetLabel(self):
        return wx.MenuItem.GetLabelText(self.GetItemText())

Didn't see this before my other post.

In 2.8 "GetLabel" doc states:
Returns the text associated with the menu item without any accelerator characters it might contain.

So, shouldn't it be "Getlabel = GetItemLabelText" or

def GetLabel(self):
     return wx.MenuItem.GetItemLabelText()

Werner

···

On 04/10/2010 20:08, Robin Dunn wrote:

Hello

I am having problems with the toolbar. My code works fine with:

- 2.8.11.0 (msw-unicode)
- 2.9.0.1.b20100122 (msw-unicode)

The toolbar looks weird with:

- 2.9.1.1.b20100922 (msw-unicode)
- 2.9.1.1.b20101001 (msw-unicode)

I wrote a small code snippet to make it easy to reproduce.
It needs four 32x32 images: "edit copy.GIF", "edit cut.GIF", "edit
paste.GIF", "redo.GIF", "undo.GIF".
Code is:

import cStringIO, os.path, sys

# this is for 2.8.11.0
#PATH_WX = r'C:\Python26\Lib\site-packages\wx-2.8-msw-unicode'

# this is for 2.9.1.1.b20101001
PATH_WX = r'C:\Python26\Lib\site-packages\wx-2.9.1-msw'

sys.path.insert(0, PATH_WX)
import wx

class TestFrame(wx.Frame):
    def __init__(self,parent, id,title,position,size):
        wx.Frame.__init__(self,parent, id,title,position, size)

        self.CreateToolBar()
        self.toolbar = self.GetToolBar()
        self.toolbar.ClearTools()

        for ico_name in ['edit copy.gif', 'edit cut.gif', 'edit
paste.gif', 'undo.gif', 'redo.gif']:
            self.add_button(ico_name)

        self.toolbar.Realize()
        self.Show(True)

    def add_button(self, label):
        '''
        Add button in toolbar
        '''
        bmp = wx.Image(label, wx.BITMAP_TYPE_ANY).ConvertToBitmap()
        btn = wx.BitmapButton(self.toolbar, -1, bmp)

        btn.SetLabel(label[:-4])
        self.toolbar.AddControl(btn)

        maxw = bmp.GetWidth()
        maxh = bmp.GetHeight()
        self.toolbar.SetToolBitmapSize((maxw+4, maxh+4))

class App(wx.App):
    def OnInit(self):
        frame = TestFrame(None, -1, "Toolbar Wx " +
PATH_WX,wx.DefaultPosition,(550,200))
        self.SetTopWindow(frame)
        return True

if __name__ == "__main__":
    app = App(0)
    app.MainLoop()

Hi,

The uninstaller of 2.9.1.1.b20100922 does not remove
the branch \wx-2.9.1-msw\wx\tools\Editra or something
like this. This leads to a living non empty
\site-packages\wx-2.9.1-msw dir after an uninstall.

Actually, I've recently been thinking that XRCed and Editra probably do not
belong in the wx.tools package, and should probably be separated from the
wxPython runtime installers. Currently the only thing installed for them by
the various "Docs, Demo, Samples, Tools" installer/package/disk-image is a a
start menu shortcut where appropriate and a simple script that imports from
wx.tools which was already installed with the runtime, and runs a main() in
that module.

In my opinion if the packaging is to stay similar to what is done now
(i.e not moving to individual installers for the tools) I think that
they do belong in wx.tools but that wx.tools does not belong with the
main runtimes and should be fully part of the Demo and Tools package,
instead of the current half and half setup where the modules are
installed with the main runtimes and the launchers/shortcuts ect.. are
installed with the demo and tools package.

I also like Kevin's idea of the Runtimes, Runtimes+Tools installers.
Though we would likely still also need to have a Demos and Tools only
installer on top of that as well.

I would also like to suggest that we make some changes to the scripts
like make_installer.py to get rid of the static strings for generating
the inno installer. It is a bit of a maintenance nightmare and I know
that Editra has been broken in many of the wxPython releases since it
was added simply due to missing files that were not picked up by the
installer since the string was not updated for new directories. So I
was thinking it a good idea to modify that script to generate most of
the installer script so that new files/directories will be picked up
automatically.

Cody

···

On Mon, Oct 4, 2010 at 6:44 PM, Robin Dunn <robin@alldunn.com> wrote:

On 10/2/10 1:46 AM, jmfauth wrote:

Yes, I missed the obvious again on this one. :frowning:

···

On 10/5/10 1:29 AM, werner wrote:

On 04/10/2010 20:08, Robin Dunn wrote:
...

%pythoncode {
GetLabel = GetLabelText
GetText = GetItemLabel
SetText = SetItemLabel
}

Hmmm... Looking at this again it seems that it should be something
like this instead of just an alias:

def GetLabel(self):
return wx.MenuItem.GetLabelText(self.GetItemText())

Didn't see this before my other post.

In 2.8 "GetLabel" doc states:
Returns the text associated with the menu item without any accelerator
characters it might contain.

So, shouldn't it be "Getlabel = GetItemLabelText" or

--
Robin Dunn
Software Craftsman