小编Wen*_*ndy的帖子

wxPython -- 如何在某些事件中更新 BitmapButton 的边框样式,例如单击

我正在尝试在创建按钮后添加/删除 BitmapButton 的边框。我还没有找到任何工作示例来更新 BitmapButton 的外观。说

self.btn = wx.BitmapButton(self.panel, wx.ID_ANY, bmp, pos=(...))
self.Bind(wx.EVT_BUTTON, self.OnClick, self.btn)
Run Code Online (Sandbox Code Playgroud)

然后在 OnClick

def OnClick(self):
    # what should be here to give / remove the border of the button being clicked
Run Code Online (Sandbox Code Playgroud)

谢谢

python wxpython border bitmap button

2
推荐指数
1
解决办法
2028
查看次数

标签 统计

bitmap ×1

border ×1

button ×1

python ×1

wxpython ×1