I am not sure how I should size this, I have been trying to use sizer but it seems i am doing something wrong all the time.
Basically i have this code:
self.button = wx.Button(self, label="Create New", pos=(25,250))
and i would like to use a sizer with it. So it will adjust its position always to the window. The initial starting position is 25, 250. The height of the initial window is 400.
I would like the button to adjust accordingly to the window changes.
Thank you, please comment if you have any questions or need clarification.
Here you have a wxglade automatically-generated code showing how to use a
wx.BoxSizer.It is simply a Frame with a panel widget. You can change the panel with your button and it will work perfectly. The idea is that you could add other widgets as it is done for the
wx.Panelin:this produce your widgets being situated in a row. If you want another disposition you could use a different sizer, You can also add sizers with widgets to other sizers. The parameters in sizer.Add() determine the borders and behavior of the sizer. You should check wxPython/wxglade documentation for that. Anyway, the estructure is always like the one below: