开发者

WxWidget/WxPython; 3 column resizable layout

I'm trying to figure out how i can have a 3 column layout where the (smaller) left and right columns are resizable with a drag开发者_C百科gable separator on each side of the center/main area. I've tried using splitwindow but that seems to only split in two parts.

Hope someone can give me pointers on how it can be done.


I susggest that you create three panels, side by side. When one of the panels is resized by the user, you will have to adjust the size of the other panels to compensate - so that there are no gaps or overlaps. You can do this by handling the resize event, probably in the parent windows of the three panels.

Another way, which requires you to write less code, would be to use wxGrid with one row and three columns and zero width labels for columns and rows. You will lose the flexibility of panels, but wxGrid will look after the resizing of the column widths for you.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜