Search code examples
c++user-interfacewxwidgets

How to scale my wxGrid when resizing a frame?


i have a few sizers inside my wxFrame and i have added wxGrid inside one of them. But when iam resizing the frame (or maximizing it), the width and length of my grid stays the same as it was and as i stated in the constructor. Ive tried binding it throught EVT_SIZE but that was probably bad idea. How can i make my grid to resize with the frame ? Thank you


Solution

  • *FIXED*

    I was adding my grid to sizer like this

    bSizertelo->Add(grid, 1, wxALL, 20);
    

    When ive added wxEXPAND flag, it got resizable with the frame xD

    bSizertelo->Add(grid, 1, wxALL|wxEXPAND, 20);