Pablo
Pablo

Reputation: 45

wx.SearchCtrl problems in wxpython

I am developing an application in python using the graphic library wxpython. I want to add a serchbox (searchctrl). In the picture you can see the application without searchbox and then with the searchbox in the Display area

enter image description here

As you can see the table of the display area got smaller. In order to set the searchbox at the right side I just used:

ButtonBoxDosSizer.AddSpacer(99)

It is 99 because for this value the searchbox is set where I want it. I just tested some other values until I came to that one.

Does anybody knows why the table got smaller or pulled down?

Upvotes: 0

Views: 159

Answers (1)

nepix32
nepix32

Reputation: 3177

Try this:

    sz = ButtonBoxDosSizer
    # ...
    sz.AddSpacer(99)

in comparison to that:

    sz.AddSpacer((99, -1))

The docs are not so clear about what is allowed for parameter size, but it seem clear for me from the doc, that size if given as int means both height and width. And a size tuple component of -1 will leave this dimension to the sizing process.

Upvotes: 1

Related Questions