Phoenix
Phoenix copied to clipboard
Warning: Expected min height of view: (<NSButton: 0x7fe095ca1ff0>)
Operating system: MacOS Big Sur wxPython version & source: pip install wxPython==4.1.1 Python version & source: python=3.7.9 Description of the problem: one error occurred when using the wx.MessageBox, but i don't know how to solve it after trying some open solutions. the error as follow: Python[42091:8551856] Warning: Expected min height of view: (<NSButton: 0x7fe095ca1ff0>) to be less than or equal to 30 but got a height of 32.000000. This error will be logged once per view in violation. And it appeared after i clicked the button of message test.
import wx
class MyFrame(wx.Frame):
def __init__(self, parent, title):
super(MyFrame, self).__init__(parent, title=title, size=(400, 200))
self.pnl = wx.Panel(self)
v_box = wx.BoxSizer(wx.VERTICAL)
self.btn = wx.Button(self.pnl, label='Message Btn', size=(100, 25))
self.btn.Bind(wx.EVT_BUTTON, self.message_test)
self.pnl.SetSizer(v_box)
self.Center()
self.Show()
def message_test(self, event):
wx.MessageBox(parent=self, message='Warnings for message test!', caption='Warning', style=wx.OK | wx.ICON_WARNING)
if __name__ == '__main__':
app = wx.App()
MyFrame(None, 'test')
app.MainLoop()
anybody can help me? thank you very much.
Also, the icon for Warning didn't display after clicking the button
I can't reproduce that, although I'm using macOS Monterey and also Python 3.8. Your test program works fine for me.
Same error. Did you find out how to fix it? arning: Expected min height of view: (<NSButton: 0x7f8784b89d40>) to be less than or equal to 30 but got a height of 32.000000. This error will be logged once per view in violation. 2022-05-26 16:00:28.204 python[7284:362371]
Is there any update on this? I'm also getting the same error.
I got the same error. Python 3.7 on MacOS Big Sur.
also getting the same error on Python 3.8 and Monterey
Still there on 3.9...
It's still there now :(....just when I think I have finished making my project, I find that this error keeps popping up. Did anyone find a solution to it?