How to get a dockable widget

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How to get a dockable widget

Mark Summerfield-2
I really like the wx.propgrid. I've tried to create an app with a TextCtrl and a PropertyGrid with the latter in a dock window. The problems I have are (1) I can't make the TextCtrl take up all the available space, either initially, or on window resizing, and (2) after floating the dock window free, I can't get it to redock.

I've made the smallest example I can think of to illustrate this attached.

I think the problem may be to do with the wx.Frame having two panels, one containing the TextCtrl and the other the PropertyGrid?
I don't want the TextCtrl to be dockable (since eventually it'll be replaced with the 'main window' widget).

Thanks!

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

dock.py (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: How to get a dockable widget

Mark Summerfield-2
I solved this problem by adding the following code:

        self.manager.AddPane(self.panel,
                aui.AuiPaneInfo().CenterPane().PaneBorder(False))

(after moving the creation of the manager to the start of the create_layout method).

I also figured out how to redock: drag the dock to the middle of the window and when the mouse is over one of the arrows that appears, release to dock in that arrow's indicated area.

I haven't workout out how to get load/save perspective working yet -- and the AUI.py example is 3KLOC and not easy to understand!

On Friday, October 20, 2017 at 2:20:09 PM UTC+1, Mark Summerfield wrote:
I really like the wx.propgrid. I've tried to create an app with a TextCtrl and a PropertyGrid with the latter in a dock window. The problems I have are (1) I can't make the TextCtrl take up all the available space, either initially, or on window resizing, and (2) after floating the dock window free, I can't get it to redock.

I've made the smallest example I can think of to illustrate this attached.

I think the problem may be to do with the wx.Frame having two panels, one containing the TextCtrl and the other the PropertyGrid?
I don't want the TextCtrl to be dockable (since eventually it'll be replaced with the 'main window' widget).

Thanks!

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.