Phoenix icon indicating copy to clipboard operation
Phoenix copied to clipboard

Warning: Expected min height of view: (<NSButton: 0x7fe095ca1ff0>)

Open doufs opened this issue 3 years ago • 8 comments

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.

doufs avatar Dec 13 '21 07:12 doufs

Also, the icon for Warning didn't display after clicking the button

doufs avatar Dec 13 '21 07:12 doufs

I can't reproduce that, although I'm using macOS Monterey and also Python 3.8. Your test program works fine for me.

swt2c avatar Dec 16 '21 22:12 swt2c

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]

FoxHunterTx avatar May 26 '22 21:05 FoxHunterTx

Is there any update on this? I'm also getting the same error.

SatyakiDe2019 avatar Jun 11 '22 16:06 SatyakiDe2019

I got the same error. Python 3.7 on MacOS Big Sur.

Guhui-Z avatar Jul 02 '22 03:07 Guhui-Z

also getting the same error on Python 3.8 and Monterey

arodphx03 avatar Jul 20 '22 16:07 arodphx03

Still there on 3.9...

phirst avatar Sep 14 '22 14:09 phirst

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?

Vrun1506 avatar Jan 01 '24 12:01 Vrun1506