Merge pull request #2218 from jmoraleda/less_opinionated_popupctl

Popup ctl respects the parameters passed to init
This commit is contained in:
Robin Dunn
2022-08-06 12:51:01 -07:00
committed by GitHub

View File

@@ -148,12 +148,6 @@ class PopupDialog(wx.Dialog):
class PopupControl(wx.Control):
def __init__(self,*_args,**_kwargs):
if 'value' in _kwargs:
del _kwargs['value']
style = _kwargs.get('style', 0)
if (style & wx.BORDER_MASK) == 0:
style |= wx.BORDER_NONE
_kwargs['style'] = style
wx.Control.__init__(self, *_args, **_kwargs)
self.textCtrl = wx.TextCtrl(self, wx.ID_ANY, '', pos = (0,0))