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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T16:15:47+00:00 2026-05-22T16:15:47+00:00

Here is my layout: I have a sizer that contains a grid (with a

  • 0

Here is my layout:

  • I have a sizer that contains a grid (with a proportion of 1) and a ok/cancel button bar

  • The all thing is in a wxDialog

Here it is:

|||||||||||||||
|             |
|    GRID     |
|             |
|             |
|             |
|||||||||||||||
| OK  CANCEL  |
|||||||||||||||

The issue is that the grid contains too many row, and over flow the screen, so in the end I don’t see the top part of the dialog. Is there a way, when calling Fit() on the dialog, to limit its height ?

I have tried stuff like this: SetSizeHints(-1,-1,-1,500); and SetMaxSize(500,500) but it did not worked.

Also I have tried to do that: this->SetSize(this->GetSize().GetX(), 500);, but since the vertical scroll bar appears on the grid, it is not wide enough and a horizontal scroll bar shows up.

EDIT

In the constructor I call wxGrid(parent, wxID_ANY, wxDefaultPosition, wxDefaultSize)

  • 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-22T16:15:48+00:00Added an answer on May 22, 2026 at 4:15 pm

    The easiest way to handle this is to use a grid of fixed size. If there are more rows than will fit, then a scroll bar will appear. You set the size you want in the constructor.

    new wxGrid( this, IDC_grid, wxPoint(-1,-1),wxSize(igridxsize,igridysize));
    

    If you want the size of the grid to adjust, e.g. when the user resizes the application window, things are a bit more complex. You need handle the window size event and change the grid size as appropriate.

    Something along these lines:

    myDialog::OnSize(wxSizeEvent& event);
    {
    wxSize dialogSize = event.GetSize();
    myGrid->OnSize( wxSizeEvent(
         dialogSize.GetWidth() * 0.9, dialogSize.GetHeight() * 0.7 ));
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So here is the issue, I have 6 divs that are using jQuery UI
here is my mysql and php code layout: I have 3 tables tableA stores
I have a mockup layout for something here . Essentially there are sections, columns
Here is the scenario: I have two asp pages. a.aspx is layout and b.aspx
Here is the directory layout that was installed with Leopard. What is the A
I have a site layout that uses floats to achieve the desired columns/rows. On
Guys, I have a CSS Layout that I am using that has a header,
Right now, I have a layout that looks like one of the two images
I have a WPF Window that contains a UserControl with a MinWidth and MinHeight.
I have an html/css page that is supposed to use an html table layout

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.