본문 바로가기

Language/Python

[wxPython] wxFrame::wxFrame 생성하기(생성자)

본 내용의 출처는 이글루 블로그의 '하린아빠' 라는 네임을 쓰시는 분의 블로그입니다.

[출처] - http://pythondev.egloos.com/83910


행여나 이글루 블로그가 없어지면 참고할 곳이 사라지기에 주인장님께 댓글을 남기고 퍼 옵니다.




[wxPython] wxFrame::wxFrame 생성하기(생성자)

wxFrame::wxFrame

wxFrame()

기본 생성자.

[예제 1] 기본 모양의 Frame 생성시
         wx.Frame(wx.Window parent, id, string title,
         wx.Point pos = wx.DefaultPosition, wx.Size size = wx.DefaultSize,
         style = wx.DEFAULT_FRAME_STYLE, string name = 'frame')


# Frame 사이즈를 고정하려면 위의 밑줄친 부분을 "style=wx.DEFAULT_FRAME_STYLE ^ wx.RESIZE_BORDER" 로 변경하면 된다.



[예제 2] 아이디, 제목, 위치, 크기 지정하여 생성시
         frame = wx.Frame(None, 100, 'Title', wx.Point(100,50), wx.Size(100,100))

[예제 2] 아이디, 제목, 위치, 크기 지정하여 생성시
         frame = wx.Frame(None, 100, 'Title', size = wx.Size(100,100))

[레퍼런스 내용]

wxFrame(wxWindowparentwxWindowID idconst wxStringtitleconst wxPoint& pos = wxDefaultPositionconst wxSize& size = wxDefaultSizelong style = wxDEFAULT_FRAME_STYLEconst wxStringname = "frame")

Constructor, creating the window.

Parameters

parent

      The window parent. This may be NULL. If it is non-NULL, the frame will always be displayed on top of the parent window on Windows.

id

      The window identifier. It may take a value of -1 to indicate a default value.

title

      The caption to be displayed on the frame's title bar.

pos

      The window position. A value of (-1, -1) indicates a default position, chosen by either the windowing system or wxWidgets, depending on platform.

size

      The window size. A value of (-1, -1) indicates a default size, chosen by either the windowing system or wxWidgets, depending on platform.

style

name

      The name of the window. This parameter is used to associate a name with the item, allowing the application user to set Motif resource values for individual windows.

Remarks

For Motif, MWM (the Motif Window Manager) should be running for any window styles to work (otherwise all styles take effect).

See also

wxFrame::Create


wxFrame::~wxFrame

void ~wxFrame()

Destructor. Destroys all child windows and menu bar if present.