Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7718675
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T03:13:27+00:00 2026-06-01T03:13:27+00:00

Im Trying to create this: |———————————————| | Panel 1a | Panel 2a | Panel

  • 0

Im Trying to create this:

|---------------------------------------------|
| Panel 1a |        Panel 2a        | Panel 3 |
|          |                        |         |
|          |                        |         |
|-----------------------------------|         |
| Panel 1b |        Panel 2b        |         |
|          |                        |         |
|---------------------------------------------|

So far I can only create this:

|---------------------------------------------|
| Panel 1a |        Panel 2a        | Panel 3 |
|          |                        |         |
|          |                        |         |
|---------------------------------------------|

How can I split panel 1a and Panel 2a in half? with a splitter?

My code is as follows:

import wx


class TestSashWindow(wx.Panel):
    def __init__(self, parent):
        wx.Panel.__init__(self, parent, -1)

        winids = []


        leftwin1 =  wx.SashLayoutWindow(self, -1, wx.DefaultPosition, (200, 30), wx.NO_BORDER|wx.SW_3D)
        leftwin1.SetDefaultSize((120, 1000))
        leftwin1.SetOrientation(wx.LAYOUT_VERTICAL)
        leftwin1.SetAlignment(wx.LAYOUT_RIGHT)
        leftwin1.SetSashVisible(wx.SASH_LEFT, True)



        self.leftWindow1 = leftwin1
        winids.append(leftwin1.GetId())
        self.remainingSpace = wx.Panel(self, -1, style=wx.SUNKEN_BORDER)


        leftwin2 = wx.SashLayoutWindow(self, -1, wx.DefaultPosition, (200, 30), wx.NO_BORDER|wx.SW_3D)
        leftwin2.SetDefaultSize((120, 1000))
        leftwin2.SetOrientation(wx.LAYOUT_VERTICAL)
        leftwin2.SetAlignment(wx.LAYOUT_LEFT)
        leftwin2.SetSashVisible(wx.SASH_RIGHT, True)

        self.leftWindow2 = leftwin2
        winids.append(leftwin2.GetId())
        self.remainingSpace = wx.Panel(self, -1, style=wx.SUNKEN_BORDER)

        self.Bind(wx.EVT_SASH_DRAGGED_RANGE, self.OnSashDrag,id=min(winids), id2=max(winids))
        self.Bind(wx.EVT_SIZE, self.OnSize)
        slw = leftwin1

        x = wx.Notebook(slw, -1)
        for i in xrange(2):
            x.AddPage(wx.Panel(x, -1), str(i))

class mainframe(wx.Frame):
    def __init__(self):
        wx.Frame.__init__(self, None, -1, size=(400,300), title="sash test")

        self.a = TestSashWindow(self)


if __name__ == '__main__':
    a = wx.App(0)
    b = mainframe()
    b.Show(1)
    a.MainLoop()
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T03:13:29+00:00Added an answer on June 1, 2026 at 3:13 am

    The generell concept of layout management are containers and widgets. In containers you can place other containers and widgets. To accomplish the given layout, you have to organize your containers and widgets in a hierarchy in a clever way. Since your supplied code is still incomplete, I’ll won’t provide you with a full solution, but rather answer your question how you can split both panels.

    1. Create two panels, namely panel1, panel2 and panel3. It seems you’ve gotten so far.
    2. Set sizers on both (for instance a BoxSizer)
    3. Create two panels, panel1a and panel1b with panel1 as parent. Place widgets in these two panels as wanted.
    4. Create two panels, panel2a and panel2b with panel2 as parent. Place widgets in these two panels as wanted.
    5. Done! For the desired layout, you don’t necessarily need a Splitter (only if you wish to make them resizable. In that case, panel1 and panel2 are replaced by splitters. Read this example for details)

    Visualization:

    + mainframe (horizontal layout)
    |
    +-panel1 (vertical layout)
    | +-panel1a
    | +-panel1b
    |
    +-panel2 (vertical layout)
    | +panel2a
    | +panel2b
    |
    +-panel3
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Ive been trying to create this code for some time now and just wondered
I'm trying to create a function called saveorder . This is my code so
I am trying to create this QT gui using a thread but no luck.
I am trying to create this tooltip sample for my wordpress it works just
I am trying to create this simple application in c#: when the user double
I'm trying to create this effect: http://www.thecssninja.com/demo/css_tree/ the problem I'm having is that the
I am trying to create something like this as i have done it in
I'm trying to find out how they were able to create this site. http://www.cpeople.ru
Trying to create a background-image slideshow and am getting this error... This is the
I'm trying to create a layout similar to this: alt text http://img20.imageshack.us/img20/3533/stackn.png Here's the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.