Hi everyone!
Why some wx.ALIGN* flags are skipped?
Is the simultaneous use of these flags contradictory?
wx.ALIGN_LEFT | wx.ALIGN_RIGHT
or
wx.ALIGN_TOP | wx.ALIGN_BOTTOM
import wx
app = wx.App()
master = wx.Frame(None)
master.SetBackgroundColour("white")
gbs = wx.GridBagSizer(2,2)
flagcol = {0: wx.ALIGN_LEFT, 1: wx.ALIGN_LEFT | wx.ALIGN_RIGHT, 2: wx.ALIGN_RIGHT}
flagrow = {0: wx.ALIGN_TOP, 1: wx.ALIGN_TOP | wx.ALIGN_BOTTOM, 2: wx.ALIGN_BOTTOM}
for r in range(3):
for c in range(3):
p = wx.Panel(parent=master, size=wx.Size(50, 50))
p.SetBackgroundColour((20*c*r,50*r,80*c))
gbs.Add(item=p, pos=(r, c), flag=flagcol[c] | flagrow[r])
if not gbs.IsColGrowable(c):
gbs.AddGrowableCol(c, 1)
gbs.AddGrowableRow(r, 1)
master.SetSizerAndFit(gbs)
master.Layout()
master.Show()
app.MainLoop()
Best regards!