开发者

How do I get the size of an individual cell of a wx.GridSizer?

开发者 https://www.devze.com 2023-01-06 10:29 出处:网络
I\'m wondering if I could get the size of an individual cell of a wx.GridS开发者_JAVA百科izer after calling Fit(). If so, how do I do that?item = sizer.GetItem(index)

I'm wondering if I could get the size of an individual cell of a wx.GridS开发者_JAVA百科izer after calling Fit(). If so, how do I do that?


item = sizer.GetItem(index)
size = item.GetSize()

How to find the item's index? From the documentation,

Items are placed in the cells of the grid in the order they are added, in row-major order. In other words, the first row is filled first, then the second, and so on until all items have been added. (If neccessary, additional rows will be added as items are added.)

0

精彩评论

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