[wxPython-users] wxPython mac: HSCROLL bug, Help menu bar item bug

Robin Dunn robin at alldunn.com
Mon Apr 16 10:07:38 PDT 2007


7stud wrote:
> imac, os 10.4.7, python 2.4.4, wxPython from this download:
> 
> wxPython2.8-osx-unicode-2.8.3.0-universal10.4-py2.4.dmg
> 
> Since these bugs are somewhat difficult to find information about, 
> I thought I would make this post.  I discovered them while playing
> around with my first wxPython hello world program.

BTW, it's usually better to report each problem in a separate email. 
Then it's easier for people to answer one or the other if they don't 
know both.


> 
> If you type a long sentence, no horizontal scroll bar will appear.  
> However, the default vertical scroll bar will appear if you hit 
> return a bunch of times.

This is a known problem, but Stefan hasn't yet found a solution.


> 
> I'm not really sure how ID's work, but the following code 
> overwrites the Python>About sub item:

Since there are some differences between various platform standards on 
Mac and the other platforms, wxMac tries to help you conform to the 
Apple HIG without needing to put a lot of conditional code in your app. 
  One of the ways it does this is to move standard menu items to the 
appropriate place, as long as you use the standard IDs.  As you 
discovered a menu item with an ID of wx.ID_ABOUT gets moved to the app 
menu, so does an item with an ID of wx.ID_EXIT and wx.ID_PREFERENCES. 
If you don't want to use standard IDs for these menu items then you can 
tell wxMac which items are the special ones using some static methods of 
wx.App, here are the C++ signatures:

     static void SetMacAboutMenuItemId(long val);
     static void SetMacPreferencesMenuItemId(long val);
     static void SetMacExitMenuItemId(long val);

BTW, there has been some work in 2.9 on how the Help menu is dealt with, 
so I don't think you'll see the same issues with it anymore.


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





More information about the wxpython-users mailing list