if self._autofit:
## dbg('setting client size to:', self._CalcSize())
- size = self._CalcSize()
- self.SetSizeHints(size)
- self.SetClientSize(size)
+ self.SetClientSize(self._CalcSize())
+ self.SetSizeHints(self.GetSize())
# Set value/type-specific formatting
self._applyFormatting()
self._SetInitialValue()
if self._autofit:
- size = self._CalcSize()
- self.SetSizeHints(size)
- self.SetClientSize(size)
+ self.SetClientSize(self._CalcSize())
+ self.SetSizeHints(self.GetSize())
# Set value/type-specific formatting
self._applyFormatting()
def _OnCtrl_A(self,event=None):
""" Handles ctrl-a keypress in control. Should return False to skip other processing. """
end = self._goEnd(getPosOnly=True)
- if not event or event.ShiftDown():
+ if not event or (isinstance(event, wx.KeyEvent) and event.ShiftDown()):
wx.CallAfter(self._SetInsertionPoint, 0)
wx.CallAfter(self._SetSelection, 0, self._masklength)
else: