二、框架
- 二、class Frame(TopLevelWindow)
- 1.AcceptsFocus(self)
- 2.AcceptsFocusFromKeyboard(self)
- 3.AcceptsFocusRecursively(self)
- 4.AddChild(self, child)
- 5.Centre(self, direction=None)
- 6.Create(self, parent, id=None, title=None, pos=None, size=None, style=None, name=None)
- 7.CreateStatusBar(self, number=1, style=None, id=0, name=None)
- 8.CreateToolBar(self, style=None, id=None, name=None)
- 9.Destroy(self)
- 10.DoEnable(self, enable)
- 11.DoFreeze(self)
- 12.DoGetBestClientSize(self)
- 13.DoGetBestSize(self)
- 14.DoGetBorderSize(self)
- 15.DoGetClientSize(self)
- 16.DoGetPosition(self)
- 17.DoGetSize(self)
- 18.DoGiveHelp(self, text, show)
- 19.DoMoveWindow(self, x, y, width, height)
- 20.DoSetClientSize(self, width, height)
- 21.DoSetSize(self, x, y, width, height, sizeFlags)
- 22.DoSetSizeHints(self, minW, minH, maxW, maxH, incW, incH)
- 23.DoSetWindowVariant(self, variant)
- 24.DoThaw(self)
- 25.EnableVisibleFocus(self, enabled)
- 26.GetClassDefaultAttributes(self, variant=None)
- 27.GetClientAreaOrigin(self)
- 28.GetDefaultBorder(self)
- 29.GetDefaultBorderForControl(self)
- 30.GetMainWindowOfCompositeControl(self)
- 31.GetMenuBar(self)
- 32.GetStatusBar(self)
- 33.GetStatusBarPane(self)
- 34.GetToolBar(self)
- 35.GetValidator(self)
- 36.HasTransparentBackground(self)
- 37.InformFirstDirection(self, direction, size, availableOtherDir)
- 38.InheritAttributes(self)
- 39.InitDialog(self)
- 40.OnCreateStatusBar(self, number, style, id, name)
- 41.OnCreateToolBar(self, style, id, name)
- 42.OnInternalIdle(self)
- 43.PopStatusText(self, number=0)
- 44.ProcessCommand(self, id)
- 45.ProcessEvent(self, event)
- 46.PushStatusText(self, text, number=0)
- 47.RemoveChild(self, child)
- 48.SendDestroyEvent(self, *args, **kwargs)
- 49.SetCanFocus(self, canFocus)
- 50.SetMenuBar(self, menuBar)
- 51.SetStatusBar(self, statusBar)
- 52.SetStatusBarPane(self, n)
- 53.SetStatusText(self, text, number=0)
- 54.SetStatusWidths(self, widths)
- 55.SetToolBar(self, toolBar)
- 56.SetValidator(self, validator)
- 57.ShouldInheritColours(self)
- 58.TransferDataFromWindow(self)
- 59.TransferDataToWindow(self)
- 60.TryAfter(self, event)
- 61.TryBefore(self, event)
- 62.Validate(self)
- 63 \_\_init__(self, parent=None, id=None, title=None, pos=None, size=None, style=None, name=None)
二、class Frame(TopLevelWindow)
1.AcceptsFocus(self)
功能注释
- 表示此控件根本不接受输入(即:行为类似于wxStaticText),因此不需要关注
def AcceptsFocus(self):
# 此方法可以在派生类中重写以返回false
return False
2.AcceptsFocusFromKeyboard(self)
功能注释
- 表示虽然该控件原则上可以具有焦点,但如果当用户用鼠标点击它时,它不应该包含在选项卡中使用键盘时遍历链
def AcceptsFocusFromKeyboard(self):
# 此方法可以在派生类中重写以返回false
return False
3.AcceptsFocusRecursively(self)
功能注释
- 重写以指示是此窗口还是其子窗口接受焦点
def AcceptsFocusRecursively(self):
return False
4.AddChild(self, child)
功能注释
- 添加一个子窗口。
参数解释- child : 子窗口,他也是Frame()的实例
def AddChild(self, child):_
pass
5.Centre(self, direction=None)
功能注释
- 把框架放在展示的中心
参数解释- direction: 方向, 例如:Centre(direction=BOTH)
def Centre(self, direction=None):
pass
6.Create(self, parent, id=None, title=None, pos=None, size=None, style=None, name=None)
功能注释
- 适用于两步框架结构
参数解释- parent : 父架构 Frame()的实例
- id : 编号
- title :标题
- pos :定位
- size :大小
- style :样式
- name :名称
实例- Create(parent, id=ID_ANY, title=EmptyString, pos=DefaultPosition, size=DefaultSize, style=DEFAULT_FRAME_STYLE, name=FrameNameStr)
def Create(self, parent, id=None, title=None, pos=None, size=None, style=None, name=None): # real signature unknown; restored from __doc__
return False
7.CreateStatusBar(self, number=1, style=None, id=0, name=None)
功能注释
- 在框架的底部创建一个状态栏
参数解释- number 编号
- style 样式
- id 依赖窗口的id
- name 名称
def CreateStatusBar(self, number=1, style=None, id=0, name=None):
return StatusBar
8.CreateToolBar(self, style=None, id=None, name=None)
功能注释
- 在框架的顶部或左侧创建工具栏
参数解释- style 样式
- id 依赖窗口的id
- name 名称
def CreateToolBar(self, style=None, id=None, name=None):
return ToolBar
9.Destroy(self)
功能注释
- 安全销毁窗户
def Destroy(self):
return False
10.DoEnable(self, enable)
11.DoFreeze(self)
12.DoGetBestClientSize(self)
功能注释
- 重写此方法以返回自定义控件的最佳大小
def DoGetBestClientSize(self):
return Size
13.DoGetBestSize(self)
功能注释
- GetBestSize()的实现可以被重写
def DoGetBestSize(self):
return Size
14.DoGetBorderSize(self)
15.DoGetClientSize(self)
16.DoGetPosition(self)
17.DoGetSize(self)
18.DoGiveHelp(self, text, show)
功能注释
- 用于显示所选菜单工具栏项的帮助字符串
参数解释- text 帮助提示语
- show 是否显示提示语
def DoGiveHelp(self, text, show):
pass
19.DoMoveWindow(self, x, y, width, height)
20.DoSetClientSize(self, width, height)
21.DoSetSize(self, x, y, width, height, sizeFlags)
22.DoSetSizeHints(self, minW, minH, maxW, maxH, incW, incH)
23.DoSetWindowVariant(self, variant)
24.DoThaw(self)
25.EnableVisibleFocus(self, enabled)
26.GetClassDefaultAttributes(self, variant=None)
27.GetClientAreaOrigin(self)
功能注释
- 返回框架客户端区域的原点(以客户端坐标表示)
def GetClientAreaOrigin(self):
return Point
28.GetDefaultBorder(self)
29.GetDefaultBorderForControl(self)
30.GetMainWindowOfCompositeControl(self)
31.GetMenuBar(self)
功能注释
- 返回指向当前与框架关联的菜单栏的指针(如果有的话)
def GetMenuBar(self):
return MenuBar
32.GetStatusBar(self)
功能注释
- 控件关联的当前状态栏的指针框架(如果有的话)。
def GetStatusBar(self):
return StatusBar
33.GetStatusBarPane(self)
功能注释
- 返回用于显示菜单和工具栏帮助的状态栏窗格
def GetStatusBarPane(self):
return 0
34.GetToolBar(self)
功能注释
- 返回指向当前与框架关联的工具栏的指针(如果有的话)。
def GetToolBar(self):
return ToolBar
35.GetValidator(self)
36.HasTransparentBackground(self)
37.InformFirstDirection(self, direction, size, availableOtherDir)
38.InheritAttributes(self)
39.InitDialog(self)
40.OnCreateStatusBar(self, number, style, id, name)
功能注释
- 请求状态栏时调用的虚函数CreateStatusBar()
def OnCreateStatusBar(self, number, style, id, name):
return StatusBar
41.OnCreateToolBar(self, style, id, name)
功能注释
- 请求工具栏时调用的虚函数CreateToolBar()
def OnCreateToolBar(self, style, id, name):
return ToolBar
42.OnInternalIdle(self)
43.PopStatusText(self, number=0)
44.ProcessCommand(self, id)
功能注释
- 模拟菜单命令
def ProcessCommand(self, id):
return False
45.ProcessEvent(self, event)
46.PushStatusText(self, text, number=0)
47.RemoveChild(self, child)
48.SendDestroyEvent(self, *args, **kwargs)
49.SetCanFocus(self, canFocus)
50.SetMenuBar(self, menuBar)
功能注释
- 告诉框架显示给定的菜单栏
def SetMenuBar(self, menuBar):
pass
51.SetStatusBar(self, statusBar)
功能注释
- 将状态栏与框架关联
def SetStatusBar(self, statusBar):
pass
52.SetStatusBarPane(self, n)
功能注释
- 设置用于显示菜单和工具栏帮助的状态栏窗格
def SetStatusBarPane(self, n):
pass
53.SetStatusText(self, text, number=0)
功能注释
- 设置状态栏文本并更新状态栏显示
def SetStatusText(self, text, number=0):
pass
54.SetStatusWidths(self, widths)
功能注释
- 设置状态栏中字段的宽度
def SetStatusWidths(self, widths):
pass
55.SetToolBar(self, toolBar)
功能注释
- 将工具栏与框架关联
def SetToolBar(self, toolBar):
pass
56.SetValidator(self, validator)
57.ShouldInheritColours(self)
58.TransferDataFromWindow(self)
59.TransferDataToWindow(self)
60.TryAfter(self, event)
61.TryBefore(self, event)
62.Validate(self)
63 __init__(self, parent=None, id=None, title=None, pos=None, size=None, style=None, name=None)
初始化