WxPython Making Window Scrollable after window goes less than a particular size
TANMAY AGRAWAL <[email protected]> Tue, 6 Sep 2022 23:39:16 -0700 (PDT)
| Newsgroups | gmane.comp.python.wxpython |
|---|---|
| Message-ID | <[email protected]> |
------=_Part_5109_97163562.1662532756303 Content-Type: text/plain; charset="UTF-8" Hi, I want to make my window Scrollable when I open it in my laptop screen, as opposed to when open in my bigger monitor. I believe this thing is done by using ScrolledWindow or ScrolledPanel by some way, but I exactly don't know how. Below is the minimal code for the same :- screenSize = wx.DisplaySize() screenWidth = screenSize[0] screenHeight = screenSize[1] sizer_1 = wx.BoxSizer(wx.VERTICAL) self.nb = wx.Notebook(self, wx.ID_ANY) sizer_1.Add(self.nb, 1, wx.EXPAND, 0) self.notebook_1_pane_1 = wx.lib.scrolledpanel.ScrolledPanel(self.nb,-1, size=(screenWidth,400), pos=(0,28), style=wx.SIMPLE_BORDER) self.notebook_1_pane_1.SetupScrolling() Even on the bigger monitor screen where defining self.notebook_1_pane_1 as a simple panel (using wx.Panel) gives proper GUI (without any scrolls), making it a scrolledpanel is adding scrollbars even there and making all sizers take additional spaces. Please help! -- The information contained in this electronic communication is intended solely for the individual(s) or entity to which it is addressed. It may contain proprietary, confidential and/or legally privileged information. Any review, retransmission, dissemination, printing, copying or other use of, or taking any action in reliance on the contents of this information by person(s) or entities other than the intended recipient is strictly prohibited and may be unlawful. If you have received this communication in error, please notify us by responding to this email or telephone and immediately and permanently delete all copies of this message and any attachments from your system(s). The contents of this message do not necessarily represent the views or policies of BITS Pilani. -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/wxpython-users/faaec8e2-3c14-4360-afc9-fbf47ad20431n%40googlegroups.com. ------=_Part_5109_97163562.1662532756303 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi,<div>I want to make my window Scrollable when I open it in my laptop scr= een, as opposed to when open in my bigger monitor. I believe this thing is = done by using ScrolledWindow or ScrolledPanel by some way, but I exactly do= n't know how. Below is the minimal code for the same :-<br></div><div><br><= /div><div>screenSize =3D wx.DisplaySize()</div><div>screenWidth =3D screenS= ize[0]</div><div>screenHeight =3D screenSize[1]</div><div>sizer_1 =3D wx.Bo= xSizer(wx.VERTICAL)</div><div>self.nb =3D wx.Notebook(self, wx.ID_ANY)</div= ><div>sizer_1.Add(self.nb, 1, wx.EXPAND, 0)</div><div>self.notebook_1_pane_= 1 =3D wx.lib.scrolledpanel.ScrolledPanel(self.nb,-1, size=3D(screenWidth,40= 0), pos=3D(0,28), style=3Dwx.SIMPLE_BORDER) self.notebook_1_pane_1.SetupScrolling()<br></div><div><br></div><div><p= >Even on the bigger monitor screen where defining self.notebook_1_pane_1 as= a simple panel (using wx.Panel) gives proper GUI (without any scrolls), ma= king it a scrolledpanel is adding scrollbars even there and making all size= rs take additional spaces.</p><p>Please help!</p></div> <br> The information contained in this electronic communication is intended sole= ly for the individual(s) or entity to which it is addressed. It may contain= proprietary, confidential and/or legally privileged information. Any revie= w, retransmission, dissemination, printing, copying or other use of, or tak= ing any action in reliance on the contents of this information by person(s)= or entities other than the intended recipient is strictly prohibited and m= ay be unlawful. If you have received this communication in error, please no= tify us by responding to this email or telephone and immediately and perman= ently delete all copies of this message and any attachments from your syste= m(s). The contents of this message do not necessarily represent the views o= r policies of BITS Pilani.<br> <p></p> -- <br /> You received this message because you are subscribed to the Google Groups &= quot;wxPython-users" group.<br /> To unsubscribe from this group and stop receiving emails from it, send an e= mail to <a href=3D"mailto:[email protected]">wxpy= [email protected]</a>.<br /> To view this discussion on the web visit <a href=3D"https://groups.google.c= om/d/msgid/wxpython-users/faaec8e2-3c14-4360-afc9-fbf47ad20431n%40googlegro= ups.com?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.com/d= /msgid/wxpython-users/faaec8e2-3c14-4360-afc9-fbf47ad20431n%40googlegroups.= com</a>.<br /> ------=_Part_5109_97163562.1662532756303--