Re: Change in wxPersistentRegisterAndRestore behaviour with wxAui
jon bird <[email protected]> Sat, 8 Nov 2025 09:56:36 +0000
| Newsgroups | gmane.comp.lib.wxwindows.general |
|---|---|
| Organization | OnAStickSoftware |
| Message-ID | <[email protected]> |
Now I've got my head screwed on properly, let me rephrase the question: Whilst I'm seeing this issue when using the wxPersistentObject framework, that's all working correctly, it seems more a change in behavior where setting the initial window size is concerned. As I mentioned yesterday, all the wxPersistentObject::Restore method is doing is calling SetSize on the window, if I move this call into the constructor itself, I see the same behavior. When the window is initially created, the framework (presumably through SetSizerAndFit) has figured out an optimum minimum size. If I call SetSize with a value that is *greater* than this figure, that is honored correctly in both 3.2x and 3.3.1 - the window size increases. However if I call SetSize with a figure that is *less* than this minimum size, this seems to be ignored in 3.3.1 and it always uses it's own pre-determined size. Whereas in 3.2.x (and earlier), I could reduce the window size. Having played around with re-ordering things around SetSizerAndFit, using some of the other size calls, I've not been able to find any way of overriding the initial minimum window size (this despite the fact I can happily manually shrink it with the UI once the app is running). Rgs, Jon. On Fri, 7 Nov 2025 16:06:44 +0000 jon bird <[email protected]> wrote: > On Fri, 7 Nov 2025 16:35:17 +0100 > Vadim Zeitlin <[email protected]> wrote: > > > On Fri, 7 Nov 2025 15:13:26 +0000 jon bird wrote: > > > > jb> > > jb> At this point, it's more just a query on why the behavior has > > jb> changed rather than highlighting a bug or problem. > > > > Sorry for not saying it explicitly, but there has been no > > intentional change to this behaviour. > > > > jb> Regardless, I've spent about an hour or so fiddling around with > > jb> the auidemo sample and not really got anywhere. > > > > If it's simpler to reproduce in the minimal sample, this would work > > too. But I'd need to have _something_ to work with, i.e. see this > > change in behaviour by being able to run some code which works > > differently now from how it worked before. > > > > Regards, > > VZ > > > > Right, ok please ignore pretty much everything I've said. Transpires > I'd forgotten that I'd actually implemented a wxPersistentObject > instance which handles the preservation of the window (which just > happens to be in an wxAui pane). So it's nothing to do with wxAUI > (apologies for that). > > The problem therefore appears to be around why that wxPersistentObject > isn't restoring the window (in this case) width properly. All it's > doing is making a call to: > > SetSize(wxDefaultCoord,wxDefaultCoord,Width,wxDefaultCoord); > > and is still being triggered correctly however for some reason the > size change is being ignored. > > I'll need to dig a bit further into this, in the meantime thanks for > the assistance and apologies again for the confusion. > > 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/20251108095636.00005950%40onasticksoftware.co.uk.