the wxpython gui library most of the dialogs that return value follow the same pattern this pattern returns value from the showmodel(method that indicates if the user selected ok or cancel (using the return value wx id_ok or wx id_cancelthe selected/entered value can then be obtained from suitable get method such as getcolourdata(for the colourdialog or getpath(for the dirdialog arranging widgets within container widgets can be located within window using specific coordinates (such as pixels down and pixels acrosshoweverthis can be problem if you are considering cross platform applicationsthis is because how button is rendered (drawnon mac is different to windows and different again from the windowing systems on linux/unix etc this means that different amount of spacing must be given on different platforms in addition the fonts used with text boxes and labels differ between different platforms also requiring differences in the layout of widgets to overcome this wxpython provides sizers sizers work with container such as frame or panel to determine how the contained widgets should be laid out widgets are added to sizer which is then set onto container such as panel sizer is thus an object which works with container and the host windowing platform to determine the best way to display the objects in the window the developer does not need to worry about what happens if user resizes window or if the program is executed on different windowing platform sizers therefore help to produce portablepresentable user interfaces in fact one sizer can be placed within another sizer to create complex component layouts there are several sizers available includingwx boxsizer this sizer can be used to place several widgets into row or column organisation depending upon the orientation when the boxsizer is created the orientation can be specified using wx vertical or wxhorizontal wx gridsizer this sizer lays widgets out in two dimensional grid each cell within the grid has the same size when the gridsizer object is created it is possible to specify the number of rows and columns the grid has it is also possible to specify the spacing between the cells both horizontally and vertically wx flexgridsizer this sizer is slightly more flexible version of the gridsizer in this version not all columns and rows need to be the same size (although all cells in the same column are the same width and all cells in the same row are the same height