Objects on panel piling up

I added a label, a combo box, and a text search to a panel object using wxphyton (following a book example). The three objects show piled up on the upper left, the combo box is populated and clickable, the text search can be accessed, but I cannot use them like that. Here is an example of the code:

search_sizer = wx.BoxSizer(wx.HORIZONTAL) self.search_ctrl = wx.SearchCtrl(self, style=wx.TE_PROCESS_ENTER)
self.search_ctrl.Bind(wx.EVT_TEXT_ENTER, self.search)
search_sizer.Add(self.search_ctrl, 0, wx.ALL, 5)

I assume the different objects would be added horizontally as added, but no, they are all located at 0,0
How do I fix that?

Do you assign the sizer to the parent of the widgets whose layout is to be managed? IOW, something like this:

    self.SetSizer(search_sizer)

I did. I am going to research about placing them at a specific location. That might work. Thanks.

Once you get over the learning hump with sizers they are a lot simpler than trying to do absolute positioning with anything more that a super simple layout. If you’re not able to work it out then please create a small runnable sample that demonstrates the problem and post it here so we can give you more detailed help.

Hi Robin;
Thanks for your help. I guess it was a typo somewhere or a corrupt file, I swear I could not figure it out, but I re-created the file and it works now! Take care.