How to mention height and Width in terms of percentage in size() in wxpython
Question: How do I mention `size(350,450)` in terms of percentages in `wxpython`?

    
    
    # -*- coding: utf-8 -*-
    # gotoclass.py
    import wx
    
    class Example(wx.Frame):
    
        def __init__(self, parent, title):
            super(Example, self).__init__(parent, title=title, 
                size=(390, 350))
            self.InitUI()
            self.Centre()
            self.Show()     
    
        def InitUI(self):
            panel = wx.Panel(self)
    
            font = wx.SystemSettings_GetFont(wx.SYS_SYSTEM_FONT)
            font.SetPointSize(9)
    
            vbox = wx.BoxSizer(wx.VERTICAL)
    
            hbox1 = wx.BoxSizer(wx.HORIZONTAL)
            st1 = wx.StaticText(panel, label='Class Name')
            st1.SetFont(font)
            hbox1.Add(st1, flag=wx.RIGHT, border=8)
            tc = wx.TextCtrl(panel)
            hbox1.Add(tc, proportion=1)
            vbox.Add(hbox1, flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=10)
    
            vbox.Add((-1, 10))
            panel.SetSizer(vbox)
    
    if __name__ == '__main__':
        app = wx.App()
        Example(None, title='Go To Class')
        app.MainLoop()
    


Answer: Get the screen resolution using `wx.GetDisplaySize()`. Compute the percentage
in pixels. Set the size by `self.SetSize()` later, not in the constructor but
before `self.Show()`.

