In style for full screen display
wx.MAXIMIZEI entered, but it is not displayed properly.
Something is displayed in the upper right, and the rest is gray and nothing.
import wx class MyFrame (wx.Frame): def __init __ (self): wx.Frame.__init__ (self, None, -1, "a", style = wx.MAXIMIZE) p = wx.Panel (self, -1) l = wx.StaticText (p, -1, "aiueo") app = wx.App (False) f = MyFrame () f.Show (True) app.MainLoop ()
Answer # 1
The window style is "bit flag", so
Usually in combination with the default style wx.DEFAULT_FRAME_STYLE
Specify on/off for bit operations.
It is easy to understand if it is written in binary.
wx.DEFAULT_FRAME_STYLE: Defined as wx.MINIMIZE_BOX | wx.MAXIMIZE_BOX | wx.RESIZE_BORDER | wx.SYSTEM_MENU | wx.CAPTION | wx.CLOSE_BOX | wx.CLIP_CHILDREN.
style = wx.MAXIMIZEThen, other flags are not applied.
To add a flag
style = wx.DEFAULT_FRAME_STYLE | wx.MAXIMIZE
By the way, MAZMIMIZE specifies the frame "size at initialization",
The documentation states that it is valid only for GTK +/Window.
Solution: To maximize the window ...
Maximize method to maximize the window,
There is a ShowFullScreen method to make it full screen.
For problems where the layout is not displayed as expected, apart from the maximization specification,
The direct cause is that the size of the Panel is unspecified.
The text placed in it is cut off.
Specify the size for Panel or
Using parts that manage the layout, such as BoxSizer,
Let's adjust the size and layout automatically.
# XXX: The same phenomenon can be reproduced without specifying style = MAXIMIZE. p = wx.Panel (self, -1) p2 = wx.Panel (p, -1) l = wx.StaticText (p2, -1, "aiueo")
With style = wx.MAXIMIZE specified when creating a frame,
At initialization (
At the time of __init__) To specify the size
Resizing is not notified to each widget after placing the widgets.
If you want to maximize using the Maximize () method
Since the size change is notified to the small widget, it will be displayed normally.
- python - about the display screen using django
- python - how to analyze html of the logged-in screen
- python - i can't transition the screen of django
- python - pygame full screen
- get gogole search screen automatically with python
- python - about the matter that becomes strange when "selecting" in pycharm
- i cannot transition from the sbi securities home screen to the futures trading screen by scraping python + selenium
- [python3] i want to scroll the screen after screen transition
- python - get the follower's screen name with the twitter api
- i can't make screen transitions in python (i'm a real beginner)
- [python] i want to calculate a matrix with a strange law
- python - you may need to restart the kernel to use updated packages error
- php - coincheck api authentication doesn't work
- php - i would like to introduce the coincheck api so that i can make payments with bitcoin on my ec site
- [php] i want to get account information using coincheck api
- the emulator process for avd pixel_2_api_29 was killed occurred when the android studio emulator was started, so i would like to
- python 3x - typeerror: 'method' object is not subscriptable
- i want to call a child component method from a parent in vuejs
- dart - flutter: the instance member'stars' can't be accessed in an initializer error
- xcode - pod install [!] no `podfile 'found in the project directory