Hi All,
I’m seeing some weirdness when I run my app on Windows. To wit, the screen looks like this on the Mac:
but on Windows it looks like this:
The code for the main window is:
import os
import glob
import wx
import wx.grid
from MainPanel import MainPanel
class MainFrame(wx.Frame):
def __init__(self):
flags = wx.DEFAULT_FRAME_STYLE & ~(wx.RESIZE_BORDER | wx.MAXIMIZE_BOX)
super().__init__(None, title='Spreadsheet Scorer', style=flags,
size=wx.Size(765, 440))
panel = MainPanel(self)
self.Bind(wx.EVT_BUTTON, self.__on_close, id=wx.ID_EXIT)
self.Show()
def __on_close(self, event):
""" Close the application """
self.Destroy()
if __name__ == '__main__':
app = wx.App(redirect=False)
frame = MainFrame()
app.MainLoop()
and the MainPanel (less the helper functions) is:
class MainPanel(wx.Panel):
def __init__(self, parent):
"""
Class constructor
"""
super().__init__(parent)
self.default_adj_vals = {'Plus_2x': '+2', 'Plus_1x': '+1',
'No Change': '0', 'Minus_1x': '-1',
'Minus_2x': '-2'}
self.default_comp_code_vals = {'FCN': '10', 'CFCC': '8',
'CFNotCC': '5', 'NC': '0'}
self.default_priority_code_vals = {'H': '1.0', 'M': '0.6', 'L': '0.3'}
self.__init_values()
self.main_sizer = wx.BoxSizer()
self.__add_left_pane()
self.__add_right_pane()
self.main_panel_size = self.main_sizer.GetMinSize()
self.SetSizer(self.main_sizer)
I’m sure it’s likely something that I’m not doing quite correctly but I have no clue why the screen would display differently on Windows than it does on the Mac. FWIW, the panes are being added to the main_sizer in their respective methods.
Thanks for any insights!
Chuck