Question

I'm new to Python, but I can't really find much decent documentation on the web, so I'm hoping somebody will know the answer or where the answer is...

I have a wxPython FlexGridSizer bound to a panel that contains other FlexGridSizers, I'd like to display some cell borders on the main FlexGridSizer, so each section looks encapsulated but I can't find any documentation to do it.

I tried using a panel to add to my main FlexGridView, with the panel's border on, but the panel's border doesn't always fill up the entire FlexGridView cell, so it looks choppy and uneven.

Does anybody know how to properly simulate this?

Was it helpful?

Solution

Sizers are used just to organize widgets spatially, as a matter of a fact they are 'invisible'.

I think you're on the right track with putting a panel inside each cell and turning on it's borders. Try adding it with wx.EXPAND flag, it has a chance to help.

Concerning documentation: wxPython is essentially a wrapper (well, with few extras) for the wxWidgets C++ library, so virtually everything you need can be found in wxwidgets documentation. I find this documentation browser useful. And here are some notes on interpreting C++ documentation for wxPython users, but usually everything is obvious enough.

Also for borders you might be interested in wx.StaticBox or wx.StaticBoxSizer (that etched-line box around a group of controls, often with a label)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top