Author Topic: Quick sizers question  (Read 2602 times)

Offline 280Z28

  • Regular
  • ***
  • Posts: 397
  • *insert unicode here*
Quick sizers question
« on: January 11, 2006, 01:57:41 pm »
Say you call this:

Code: [Select]
wxBoxSizer* sizer = new wxBoxSizer(wxVERTICAL);
wxSizer* childSizer = this->GetSomeSizer(); /* my own function that returns a sizer created in that function by a call to new wx*Sizer() */

// question 1 is about the following line:
// question 2 is about the following line:

// question 3 is about the following line:
// question 4 is about what would be the following line.

Then you later call SetSizer(NULL):

1) If windowPtr is a pointer to some child window, and it has a sizer that was set by SetSizer() earlier, was its sizer and child sizers of it just deleted? If so, how does the child window know to recreate its sizers because they were invalidated?

2) childSizer is an explicitly added wxSizer*. It was just deleted, correct? If so, and if I want to create it again, the correct time to do so is in the same function following the call to SetSizer(NULL) and then call SetSizer(something) later in the function, correct?

3) What did this do, and how did it affect child windows (were they resized, were they repainted, etc)?

4) What things should I do to here make sure this window's sizer expands to the full client size of this window? After THAT, what should I do to make sure the child window windowPtr is repainted with the new size in this window's sizer (since it's not the full client size with childSizer taking up some of the space)?

I'll have more questions after these so stay tuned. :D
« Last Edit: January 11, 2006, 02:03:24 pm by 280Z28 »
78 280Z, "a few bolt-ons" - 12.71@109.04
99 Trans Am, "Daily Driver" - 525rwhp/475rwtq
 Check out The Sam Zone :cool: