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 5974467
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T20:56:51+00:00 2026-05-22T20:56:51+00:00

What I want to do is create 3 column that will expand as the

  • 0

What I want to do is create 3 column that will expand as the window expands. But I want to put limits on it so the different columns expand to different maximum amounts.

What I have done here is used wxGlade to create a frame w/ a grid sizer that has 1 row and three columns. I want Part1 to have a fixed width of ‘A’, Part2 to have a fixed width of ‘B’ and Part3 to be able to expand as normal.

How do I do that?

#!/usr/bin/env python
# -*- coding: iso-8859-15 -*-
# generated by wxGlade 0.6.3 on Tue May 24 11:35:21 2011

import wx

# begin wxGlade: extracode
# end wxGlade



class MyFrame1(wx.Frame):
    def __init__(self, *args, **kwds):
        # begin wxGlade: MyFrame1.__init__
        kwds["style"] = wx.DEFAULT_FRAME_STYLE
        wx.Frame.__init__(self, *args, **kwds)
        self.panel_1 = wx.Panel(self, -1)
        self.sizer_10_staticbox = wx.StaticBox(self.panel_1, -1, "Part2")
        self.sizer_11_staticbox = wx.StaticBox(self.panel_1, -1, "Part3")
        self.sizer_9_staticbox = wx.StaticBox(self.panel_1, -1, "Part1")

        self.__set_properties()
        self.__do_layout()
        # end wxGlade

    def __set_properties(self):
        # begin wxGlade: MyFrame1.__set_properties
        self.SetTitle("frame_2")
        # end wxGlade

    def __do_layout(self):
        # begin wxGlade: MyFrame1.__do_layout
        sizer_8 = wx.BoxSizer(wx.VERTICAL)
        grid_sizer_4 = wx.GridSizer(1, 3, 0, 0)
        sizer_11 = wx.StaticBoxSizer(self.sizer_11_staticbox, wx.HORIZONTAL)
        sizer_10 = wx.StaticBoxSizer(self.sizer_10_staticbox, wx.HORIZONTAL)
        sizer_9 = wx.StaticBoxSizer(self.sizer_9_staticbox, wx.HORIZONTAL)
        grid_sizer_4.Add(sizer_9, 1, wx.EXPAND, 0)
        grid_sizer_4.Add(sizer_10, 1, wx.EXPAND, 0)
        grid_sizer_4.Add(sizer_11, 1, wx.EXPAND, 0)
        self.panel_1.SetSizer(grid_sizer_4)
        sizer_8.Add(self.panel_1, 1, wx.EXPAND, 0)
        self.SetSizer(sizer_8)
        sizer_8.Fit(self)
        self.Layout()
        # end wxGlade

# end of class MyFrame1


if __name__ == "__main__":
    app = wx.PySimpleApp(0)
    wx.InitAllImageHandlers()
    frame_2 = MyFrame1(None, -1, "")
    app.SetTopWindow(frame_2)
    frame_2.Show()
    app.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-05-22T20:56:52+00:00Added an answer on May 22, 2026 at 8:56 pm

    If you’re using a GridSizer I’d probably suggest you take a look at GridBagSizer instead.

    Once you decide if that’ll be usable, then you probably need to look into the sizer.AddGrowableRow(row) and sizer.AddGrowableCol(col) methods. They allow you to indicate columns or rows in the grid that expand. They don’t use use proportions like you’re familiar with from the BoxSizers (so if two columns grow they both grow at the same rate) but you can set some that expand and others that don’t.

    Indexes are zero based, so by your description I’d guess something like gridbagsizer_4.AddGrowableCol(2), but like my comment says, wxGlade’s naming conventions make me ill and it’s hard to tell for certain, and those methods won’t be available on the GridSizer.

    For any interested parties, there’s a post covering my form building and form dialog classes available here: Form Builder. It was easier to post it on my site where I could include attachments than to try to paste it all here.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to create a trigger that will update the column LastActivityDate to the
I want to create a new column in a MYSQL table that has Fn
I want to create a persisted computed column in a table so that I
I want to create a postgres function that builds the set of columns it
I want to create a list of columns in SQL Server 2005 that have
I want to create a database structure that will has good efficiency. Now database
I want to add a trigger that will keep on updating autoincrement column by
I want a query that will return a row for each column in a
I want to create a view that will display interesting stuff about the system
Good morning all, i want to create an event in MySQL that will UPDATE

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.