Re: Restoring saved window properties

Dietmar Schwertberger <[email protected]> Mon, 31 Mar 2025 22:33:30 +0200
Newsgroups gmane.comp.python.wxglade
Message-ID <[email protected]>
This is a multi-part message in MIME format.
--===============3984181518095812160==
Content-Type: multipart/alternative;
 boundary="------------Y0P79EzhlRWloJEK9MghnuD8"
Content-Language: en-US

This is a multi-part message in MIME format.
--------------Y0P79EzhlRWloJEK9MghnuD8
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

 From your first post I got the impression that not even the basic 
layout is restored.
("always need Alt+1 first.")

Maybe you can try some debug messages at lines 1410ff in 'switch_layout' 
where the sash positions are set:

positions = self.layout_settings["sash_positions"][new_layout] 
print("stored or default sash_positions", positions) print("initial sash 
positions", self.splitter1.GetSashPosition(), 
self.splitter2.GetSashPosition()) self.splitter1.SetSashPosition( 
positions[0] ) self.splitter2.SetSashPosition( positions[1] ) 
print("sash positions after setting", self.splitter1.GetSashPosition(), 
self.splitter2.GetSashPosition())

Actually, my VM was Ubuntu, not Kubuntu, so it's probably Gnome as well.

Regards,

Dietmar

--------------Y0P79EzhlRWloJEK9MghnuD8
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 7bit

<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    From your first post I got the impression that not even the basic
    layout is restored.<br>
    ("<span style="white-space: pre-wrap">always need Alt+1 first.")

</span>
    <p><span style="white-space: pre-wrap">Maybe you can try some debug messages at lines 1410ff in 'switch_layout' where the sash positions are set:</span></p>
    <p><span style="white-space: pre-wrap">        positions = self.layout_settings["sash_positions"][new_layout]
        print("stored or default sash_positions", positions)
        print("initial sash positions", self.splitter1.GetSashPosition(), self.splitter2.GetSashPosition())
        self.splitter1.SetSashPosition( positions[0] )
        self.splitter2.SetSashPosition( positions[1] )
        print("sash positions after setting", self.splitter1.GetSashPosition(), self.splitter2.GetSashPosition())

</span></p>
    <p><span style="white-space: pre-wrap">Actually, my VM was Ubuntu, not Kubuntu, so it's probably Gnome as well.</span></p>
    <p><span style="white-space: pre-wrap">Regards,</span></p>
    <p><span style="white-space: pre-wrap">Dietmar</span></p>
  </body>
</html>

--------------Y0P79EzhlRWloJEK9MghnuD8--


--===============3984181518095812160==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


--===============3984181518095812160==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
wxGlade-general mailing list
wxGlade-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/wxglade-general

--===============3984181518095812160==--