When I click on a menu item (‘translation’), the class ‘PanelTwo’ does not display the widgets that I have provided. When I test “PanelTwo” as a independent class, it displays. Any pointers to fix the bug is highly appreciated.
When I click on a menu item (‘translation’), the class ‘PanelTwo’ does not display the widgets that I have provided. When I test “PanelTwo” as a independent class, it displays. Any pointers to fix the bug is highly appreciated.
The first line is the panel. The second line creates a second panel, thus the confusion. You should replace all instances of “panel” with “self”, which refers to the instance of the panel class you’ve made.
To see this work quickly, change that second line to:
panel = self
But for clarity, you should just go and make the 12 or so changes and keep the name as self.
You have one other problem: you are working with a bare frame. You shouldn’t do that. You should create a frame with a panel on it as the background, and then add things to that panel. Because of the way you are doing it, the interior panel doesn’t get a Layout() until you manually resize the frame (try it). I don’t know a good way to do that programmatically other than this hack, which would be called in nucTranslation:
Because of the way you
are doing it, the interior panel doesn't get a Layout() until you
manually resize the frame (try it). I don't know a good way to do that
programmatically other than this hack, which would be called in
nucTranslation:
When I click on a menu item (‘translation’), the class ‘PanelTwo’ does not display the widgets that I have provided. When I test “PanelTwo” as a independent class, it displays. Any pointers to fix the bug is highly appreciated.
The first line is the panel. The second line creates a second panel, thus the confusion. You should replace all instances of “panel” with “self”, which refers to the instance of the panel class you’ve made.
To see this work quickly, change that second line to:
panel = self
But for clarity, you should just go and make the 12 or so changes and keep the name as self.
You have one other problem: you are working with a bare frame. You shouldn’t do that. You should create a frame with a panel on it as the background, and then add things to that panel. Because of the way you are doing it, the interior panel doesn’t get a Layout() until you manually resize the frame (try it). I don’t know a good way to do that programmatically other than this hack, which would be called in nucTranslation: