[ wxwindows-Bugs-1742682 ] AddControl broken in AUI toolbar for Mac

SourceForge.net noreply at sourceforge.net
Thu Mar 6 05:05:18 PST 2008


Bugs item #1742682, was opened at 2007-06-25 07:05
Message generated for change (Comment added) made by pgsnake
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=109863&aid=1742682&group_id=9863

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: AUI
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: CM Barton (cmbarton)
Assigned to: Benjamin I. Williams (biwillia76)
Summary: AddControl broken in AUI toolbar for Mac

Initial Comment:
This is related to Bug 1732558. But the title of the bug is not very clear and it has been sitting unassigned for several months.

On the Mac, any control added to an AUI managed toolbar (i.e., with AddControl) is invisible and inaccessible. It creates no error; it just isn't there.

This behavior has been consistent on both PPC and Intel Macs, and remains the same with the current wxPython 2.8.4 (I assume it's a problem with the underlying wxWidgets).

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

Comment By: Dave Page (pgsnake)
Date: 2008-03-06 13:05

Message:
Logged In: YES 
user_id=1181215
Originator: NO

If it helps, the patch below illustrates the problem using the aui sample
in 2.8.7. As noted in the related bug, using the non-native toolbar (by
defining wxMAC_USE_NATIVE_TOOLBAR=0 does also solve the problem).


*** auidemo.cpp.orig	Thu Mar  6 12:11:35 2008
--- auidemo.cpp	Thu Mar  6 12:14:28 2008
***************
*** 636,641 ****
--- 636,664 ----
      EVT_AUINOTEBOOK_PAGE_CLOSE(wxID_ANY, MyFrame::OnNotebookPageClose)
  END_EVENT_TABLE()
  
+ static char *pulldown_xpm[] = {
+ /* columns rows colors chars-per-pixel */
+ "16 15 2 1",
+ ". c Black",
+ "  c None",
+ /* pixels */
+ "                ",
+ "                ",
+ "                ",
+ "                ",
+ "                ",
+ "                ",
+ "      .....     ",
+ "       ...      ",
+ "        .       ",
+ "                ",
+ "                ",
+ "                ",
+ "                ",
+ "                ",
+ "                "
+ };
+ 
  
  MyFrame::MyFrame(wxWindow* parent,
                   wxWindowID id,
***************
*** 771,776 ****
--- 794,807 ----
      tb2->AddTool(101, wxT("Test"), tb2_bmp1);
      tb2->AddTool(101, wxT("Test"), tb2_bmp1);
      tb2->AddTool(101, wxT("Test"), tb2_bmp1);
+     tb2->AddSeparator();
+ 
+     // Add a wxBitmapButton
+     wxBitmap bmpPulldown(pulldown_xpm);
+     wxBitmapButton *btnBmp = new wxBitmapButton(tb2, wxID_ANY,
bmpPulldown, wxDefaultPosition, wxDefaultSize, wxNO_BORDER);
+     tb2->AddControl(btnBmp);
+ 	
+     tb2->AddSeparator();
      tb2->Realize();


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

Comment By: CM Barton (cmbarton)
Date: 2007-06-27 21:02

Message:
Logged In: YES 
user_id=1716814
Originator: YES

Correction. This is related to bug 1638728. I pasted in the wrong number.

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

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=109863&aid=1742682&group_id=9863




More information about the wx-dev mailing list