Re: Change in wxPersistentRegisterAndRestore behaviour with wxAui

jon bird <[email protected]> Sun, 9 Nov 2025 08:58:52 +0000
Newsgroups gmane.comp.lib.wxwindows.general
Organization OnAStickSoftware
Message-ID <[email protected]>
On Sat, 8 Nov 2025 23:13:23 +0100
Vadim Zeitlin <[email protected]> wrote:

> On Sat, 8 Nov 2025 19:03:52 +0000 jon bird wrote:
> 
> jb> No, it's me, I'm still on something - wxPanel not wxFrame (it's
> jb> been a long week).  
> 
>  Calling SetSize() on wxPanel should definitely work. If it seems not
> to, it must be due to something else resetting this size later.
> 
>  Regards,
> VZ
> 
Attached is a diff which demonstrates this problem against the auidemo.
All it really does is shrink down the width of the Tree Pane on the
left hand side. 

When built against 3.3.1, it makes no difference however with 3.2.7 you
can see the window width has been shrunk (not sure if you can actually
apply the patch directly to the 3.2 sample as there have been quite a
few changes however it's a tiny change so easy enough to do by hand).

I had a peruse of the perspective classes you directed me at yesterday,
including wxAuiSerializer however I couldn't see anything obvious in
the wxAuiPaneLayoutInfo structure which would be used to set the size
of the pane - unless it's the dock_size attribute from
wxAuiDockLayoutInfo.

Rgs,

Jon.


-- 
-- 
== jon bird - software engineer
== <reply to address _may_ be invalid, real mail below>
== <reduce rsi, stop using the shift key>
== posted as: news 'at' onasticksoftware 'dot' co 'dot' uk

-- 
Please read https://www.wxwidgets.org/support/mlhowto.htm before posting.
--- 
You received this message because you are subscribed to the Google Groups "wx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion visit https://groups.google.com/d/msgid/wx-users/20251109085852.00000252%40onasticksoftware.co.uk.
aui-set-size.diff (application/octet-stream, 631 B)
*** D:/VC/wxWidgets-3.3.1/samples/aui/orig/auidemo.cpp	Sun Jul 20 23:13:00 2025
--- D:/VC/wxWidgets-3.3.1/samples/aui/auidemo.cpp	Sun Nov  9 08:39:32 2025
***************
*** 45,46 ****
--- 45,47 ----
  #include <map>
+ #include <wx/persist/toplevel.h>
  
***************
*** 631,632 ****
--- 632,636 ----
                                   wxWindow::FromDIP(wxSize(800, 600), nullptr));
+ 
+     wxPersistentRegisterAndRestore(dynamic_cast<wxTopLevelWindow*>(frame), "auidemo");
+ 
      frame->Show();
***************
*** 2592,2593 ****
--- 2596,2598 ----
  
+     tree->SetSize(92, -1);
      return tree;