Search code examples
c++findwxwidgets

How can i find a sizer in wxWidgets?


I have to say my english isnt good.

Well, my problem is that i need insert a wxButton to a wxBoxSizer in a specific moment of my program. This sizer is child of other sizer and isn't a global variable. I'm in a different scope so i can't access to this wxBoxSizer.

Adding the button to the wxsizer is not a problem, i just need the wxsizer but i dont know how i get it.

I already tried functions like FindWindowById,ByName but with wxsizers but i couldn't find anything.

I hope you understand my question.If you need more information just let me know.


Solution

  • You can either locate the parent window and use its GetSizer() or any existing child of the sizer and then use its GetContainingSizer() method. There is currently no way to find the sizer itself.