[GRASSGUI] can't dock map display with AUI
Michael Barton
michael.barton at asu.edu
Fri Jun 8 02:59:47 EDT 2007
It looks like we can't doc the map display using AUI unless we redo the main
window as a wx.Window or wx.Panel. I don't know if that would be a real
problem to do or not.
See correspondence form the wxPython/wxWidgets list below.
Michael
__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University
phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton
------ Forwarded Message
> From: "SourceForge.net" <noreply at sourceforge.net>
> Date: Thu, 07 Jun 2007 23:02:16 -0700
> To: <noreply at sourceforge.net>
> Subject: [ wxwindows-Bugs-1732558 ] strange behavior managing wx.Frame with
> wx.AUIManager
>
> Bugs item #1732558, was opened at 2007-06-07 04:26
> Message generated for change (Comment added) made by biwillia76
> You can respond by visiting:
> https://sourceforge.net/tracker/?func=detail&atid=109863&aid=1732558&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: None
> Group: None
> Status: Open
> Resolution: None
> Priority: 5
> Private: No
> Submitted By: CM Barton (cmbarton)
> Assigned to: Nobody/Anonymous (nobody)
> Summary: strange behavior managing wx.Frame with wx.AUIManager
>
> Initial Comment:
> Platform: Mac OS X 10.4.9
> wxPython 2.8.4
>
> I want to manage a wx.Frame under AUI.
>
> I define a base AUI managed window with wx.AUIManager(windowname)
>
> I create the wx.Frame object
>
> However, when I try add this to the base AUI window with AddPane, it produces
> very odd results.
>
> The pane is created within the base window in the proper location and with the
> proper attributes.
>
> However, the window is created outside the base AUI window, as if it were an
> independent window, not a managed pane. That is it is NOT in the pane produced
> with AddPane but at a completely different screen location. However, it is the
> same SIZE as the pane created with AddPane
>
> Weirdly, if I change the size of the AUI-managed pane, it also changes the
> size of the independent window (i.e., the one outside the AUI base window)
> accordingly.
>
> If I define the managed pane as Float(), I get the original window AND a
> second AUI pane, exactly the same as the original window and setting directly
> on top of it. The AUI pane can be docked (though it doesn't dock correctly).
> Again, changing the size of the AUI pane changes the size of the original
> window, even though the 2 are in different screen positions.
>
> Pane management works correctly with wx.Window, wx.TextCtrl, wx.NoteBook, and
> wx.ToolBar.
>
> Michael
>
> ----------------------------------------------------------------------
>
> Comment By: Benjamin I. Williams (biwillia76)
> Date: 2007-06-08 06:02
>
> Message:
> Logged In: YES
> user_id=383645
> Originator: NO
>
>
> Hi Michael,
>
> Yes. In order to do what you've described, you need to create one frame,
> and then the other window as a wxWindow or wxPanel derived object. Let
> wxAuiManager place a frame around it then, and do the floating and docking.
> Creating two wxFrames is not the way that wxAuiManager is intended to be
> used.
>
> Good luck!
>
> All the best,
> Ben
>
> ----------------------------------------------------------------------
>
> Comment By: CM Barton (cmbarton)
> Date: 2007-06-07 19:26
>
> Message:
> Logged In: YES
> user_id=1716814
> Originator: YES
>
> Ben,
>
> Thanks for the quick and informative response.
>
> What you say fits with the behavior I've seen. Here is our situation. Our
> application (GRASS GIS) has two primary windows. They have been designed as
> independent windows so far, each with their own toolbars and other
> contents. So each is defined initially as a frame (wx.Frame). There has
> been some discussion on the possibility of allowing one of these windows
> (the one that displays maps) to be docked inside the other one (a kind of
> controls window). AUI seemed like a good way to go about this. However,
> from the behavior I reported and your comments, it seems like we'd have to
> redefine the map display window as a wx.Window in order to do this.
> Correct?
>
> Michael
>
> ----------------------------------------------------------------------
>
> Comment By: Benjamin I. Williams (biwillia76)
> Date: 2007-06-07 12:52
>
> Message:
> Logged In: YES
> user_id=383645
> Originator: NO
>
> Hello,
>
> It sounds to me like you are trying to manage a child wxFrame. If so,
> this is not the way that wxAuiManager was intended to be used. You can
> manage many child windows inside a single wxFrame. Each wxFrame should
> only have one manager. There is a one-to-one relationship between the
> two.
>
> Please let me know if I misunderstood your bug report.
>
> Thanks,
> Ben
>
> ----------------------------------------------------------------------
>
> You can respond by visiting:
> https://sourceforge.net/tracker/?func=detail&atid=109863&aid=1732558&group_id=
> 9863
------ End of Forwarded Message
More information about the grass-gui
mailing list