本文整理汇总了Python中edit_windows.ManagedBase.create_properties方法的典型用法代码示例。如果您正苦于以下问题:Python ManagedBase.create_properties方法的具体用法?Python ManagedBase.create_properties怎么用?Python ManagedBase.create_properties使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类edit_windows.ManagedBase
的用法示例。
在下文中一共展示了ManagedBase.create_properties方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: create_properties
# 需要导入模块: from edit_windows import ManagedBase [as 别名]
# 或者: from edit_windows.ManagedBase import create_properties [as 别名]
def create_properties(self):
ManagedBase.create_properties(self)
panel = wx.ScrolledWindow(self.notebook, -1)
szr = wx.BoxSizer(wx.VERTICAL)
ctor = self.properties['custom_ctor']
ctor.display(panel)
szr.Add(ctor.panel, 0, wx.EXPAND)
args = self.properties['arguments']
args.display(panel)
szr.Add(args.panel, 1, wx.ALL|wx.EXPAND, 5)
help_btn = wx.Button(panel, -1, _('Help on "Arguments" property'))
text = _("""\
The 'Arguments' property behaves differently when generating
XRC code wrt C++ or python: you can use it to add custom attributes
to the resource object. To do so, arguments must have the following
format: ATTRIBUTE_NAME: ATTRIBUTE_VALUE
For instance:
default_value: 10
is translated to:
<default_value>10</default_value>
Invalid entries are silently ignored""")
def show_help(event):
wx.MessageBox(text, _('Help on "Arguments" property'),
wx.OK|wx.CENTRE|wx.ICON_INFORMATION)
wx.EVT_BUTTON(help_btn, -1, show_help)
szr.Add(help_btn, 0, wx.BOTTOM|wx.LEFT|wx.RIGHT|wx.EXPAND, 5)
panel.SetAutoLayout(True)
panel.SetSizer(szr)
szr.Fit(panel)
self.notebook.AddPage(panel, 'Widget')
args.set_col_sizes([-1])
示例2: create_properties
# 需要导入模块: from edit_windows import ManagedBase [as 别名]
# 或者: from edit_windows.ManagedBase import create_properties [as 别名]
def create_properties(self):
ManagedBase.create_properties(self)
if self.removed_p.panel: self.removed_p.panel.Hide()
panel = wx.Panel(self.notebook, -1)
szr = wx.BoxSizer(wx.VERTICAL)
self.properties['attribute'].display(panel)
szr.Add(self.properties['attribute'].panel, 0, wx.EXPAND)
panel.SetAutoLayout(True)
panel.SetSizer(szr)
szr.Fit(panel)
self.notebook.AddPage(panel, 'Widget')
示例3: create_properties
# 需要导入模块: from edit_windows import ManagedBase [as 别名]
# 或者: from edit_windows.ManagedBase import create_properties [as 别名]
def create_properties(self):
ManagedBase.create_properties(self)
panel = wx.Panel(self.notebook, -1)
szr = wx.BoxSizer(wx.VERTICAL)
self.properties['label'].display(panel)
self.properties['value'].display(panel)
szr.Add(self.properties['label'].panel, 0, wx.EXPAND)
szr.Add(self.properties['value'].panel, 0, wx.EXPAND)
panel.SetAutoLayout(True)
panel.SetSizer(szr)
szr.Fit(panel)
self.notebook.AddPage(panel, 'Widget')
示例4: create_properties
# 需要导入模块: from edit_windows import ManagedBase [as 别名]
# 或者: from edit_windows.ManagedBase import create_properties [as 别名]
def create_properties(self):
ManagedBase.create_properties(self)
panel = wx.ScrolledWindow(self.notebook, -1, style=wx.TAB_TRAVERSAL)
prop = self.properties
szr = wx.BoxSizer(wx.VERTICAL)
prop['range'].display(panel)
prop['style'].display(panel)
szr.Add(prop['range'].panel, 0, wx.EXPAND)
szr.Add(prop['style'].panel, 0, wx.EXPAND)
panel.SetAutoLayout(True)
panel.SetSizer(szr)
szr.Fit(panel)
self.notebook.AddPage(panel, 'Widget')
示例5: create_properties
# 需要导入模块: from edit_windows import ManagedBase [as 别名]
# 或者: from edit_windows.ManagedBase import create_properties [as 别名]
def create_properties(self):
ManagedBase.create_properties(self)
panel = wx.Panel(self.notebook, -1)
szr = wx.BoxSizer(wx.VERTICAL)
self.properties['choices'].display(panel)
self.properties['selection'].display(panel)
szr.Add(self.properties['selection'].panel, 0, wx.EXPAND)
szr.Add(self.properties['choices'].panel, 1, wx.EXPAND)
panel.SetAutoLayout(True)
panel.SetSizer(szr)
szr.Fit(panel)
self.notebook.AddPage(panel, 'Widget')
self.properties['choices'].set_col_sizes([-1])
示例6: create_properties
# 需要导入模块: from edit_windows import ManagedBase [as 别名]
# 或者: from edit_windows.ManagedBase import create_properties [as 别名]
def create_properties(self):
ManagedBase.create_properties(self)
panel = wx.ScrolledWindow(self.notebook, -1, style=wx.TAB_TRAVERSAL)
self.properties["create_grid"].display(panel)
self.properties["columns"].display(panel)
self.properties["rows_number"].display(panel)
self.properties["row_label_size"].display(panel)
self.properties["col_label_size"].display(panel)
self.properties["enable_editing"].display(panel)
self.properties["enable_grid_lines"].display(panel)
self.properties["enable_col_resize"].display(panel)
self.properties["enable_row_resize"].display(panel)
self.properties["enable_grid_resize"].display(panel)
self.properties["lines_color"].display(panel)
self.properties["label_bg_color"].display(panel)
self.properties["selection_mode"].display(panel)
szr = wx.BoxSizer(wx.VERTICAL)
szr.Add(self.properties["create_grid"].panel, 0, wx.EXPAND)
szr.Add(wx.StaticLine(panel, -1), 0, wx.ALL | wx.EXPAND, 5)
szr.Add(
wx.StaticText(
panel, -1, _("The following properties are " "meaningful\nonly if 'Create grid' is selected")
),
0,
wx.LEFT | wx.RIGHT | wx.EXPAND,
10,
)
szr.Add(wx.StaticLine(panel, -1), 0, wx.ALL | wx.EXPAND, 5)
szr.Add(self.properties["columns"].panel, 0, wx.ALL | wx.EXPAND, 2)
szr.SetItemMinSize(self.properties["columns"].panel, 1, 150)
szr.Add(self.properties["rows_number"].panel, 0, wx.EXPAND)
szr.Add(self.properties["row_label_size"].panel, 0, wx.EXPAND)
szr.Add(self.properties["col_label_size"].panel, 0, wx.EXPAND)
szr.Add(self.properties["lines_color"].panel, 0, wx.EXPAND)
szr.Add(self.properties["label_bg_color"].panel, 0, wx.EXPAND)
szr.Add(self.properties["enable_editing"].panel, 0, wx.EXPAND)
szr.Add(self.properties["enable_grid_lines"].panel, 0, wx.EXPAND)
szr.Add(self.properties["enable_col_resize"].panel, 0, wx.EXPAND)
szr.Add(self.properties["enable_row_resize"].panel, 0, wx.EXPAND)
szr.Add(self.properties["enable_grid_resize"].panel, 0, wx.EXPAND)
szr.Add(self.properties["selection_mode"].panel, 0, wx.ALL | wx.EXPAND, 5)
panel.SetAutoLayout(1)
panel.SetSizer(szr)
szr.Fit(panel)
w, h = panel.GetClientSize()
self.notebook.AddPage(panel, _("Widget"))
import math
panel.SetScrollbars(1, 5, 1, int(math.ceil(h / 5.0)))
self.properties["columns"].set_col_sizes([-1, 0])
示例7: create_properties
# 需要导入模块: from edit_windows import ManagedBase [as 别名]
# 或者: from edit_windows.ManagedBase import create_properties [as 别名]
def create_properties(self):
ManagedBase.create_properties(self)
panel = wx.ScrolledWindow(self.notebook, -1, style=wx.TAB_TRAVERSAL)
self.properties['no_custom_class'].display(panel)
self.properties['tabs'].display(panel)
sizer = wx.BoxSizer(wx.VERTICAL)
sizer.Add(self.properties['no_custom_class'].panel, 0,
wx.ALL|wx.EXPAND, 3)
sizer.Add(self.properties['tabs'].panel, 1, wx.ALL|wx.EXPAND, 3)
panel.SetAutoLayout(True)
panel.SetSizer(sizer)
sizer.Fit(panel)
self.notebook.AddPage(panel, _('Widget'))
self.properties['tabs'].set_col_sizes([-1])
示例8: create_properties
# 需要导入模块: from edit_windows import ManagedBase [as 别名]
# 或者: from edit_windows.ManagedBase import create_properties [as 别名]
def create_properties(self):
ManagedBase.create_properties(self)
panel = wx.Panel(self.notebook, -1)
szr = wx.BoxSizer(wx.VERTICAL)
self.properties["label"].display(panel)
self.properties["clicked"].display(panel)
self.properties["style"].display(panel)
szr.Add(self.properties["label"].panel, 0, wx.EXPAND)
szr.Add(self.properties["clicked"].panel, 0, wx.EXPAND)
szr.Add(self.properties["style"].panel, 0, wx.EXPAND)
panel.SetAutoLayout(True)
panel.SetSizer(szr)
szr.Fit(panel)
self.notebook.AddPage(panel, _("Widget"))
示例9: create_properties
# 需要导入模块: from edit_windows import ManagedBase [as 别名]
# 或者: from edit_windows.ManagedBase import create_properties [as 别名]
def create_properties(self):
ManagedBase.create_properties(self)
panel = wx.ScrolledWindow(self.notebook, -1, style=wx.TAB_TRAVERSAL)
prop = self.properties
prop['style'].display(panel)
szr = wx.BoxSizer(wx.VERTICAL)
szr.Add(prop['style'].panel, 0, wx.EXPAND)
panel.SetAutoLayout(True)
panel.SetSizer(szr)
szr.Fit(panel)
w, h = panel.GetClientSize()
self.notebook.AddPage(panel, _('Widget'))
self.property_window.Layout()
import math
panel.SetScrollbars(1, 5, 1, int(math.ceil(h/5.0)))
示例10: create_properties
# 需要导入模块: from edit_windows import ManagedBase [as 别名]
# 或者: from edit_windows.ManagedBase import create_properties [as 别名]
def create_properties(self):
ManagedBase.create_properties(self)
panel = wx.ScrolledWindow(self.notebook, -1, style=wx.TAB_TRAVERSAL)
szr = wx.BoxSizer(wx.VERTICAL)
for name in self.property_names:
self.properties[name].display(panel)
szr.Add(self.properties[name].panel, self.property_proportion[name],
wx.EXPAND)
panel.SetAutoLayout(1)
panel.SetSizer(szr)
szr.Fit(panel)
w, h = panel.GetClientSize()
self.notebook.AddPage(panel, 'Widget')
import math
panel.SetScrollbars(1, 5, 1, int(math.ceil(h/5.0)))
示例11: create_properties
# 需要导入模块: from edit_windows import ManagedBase [as 别名]
# 或者: from edit_windows.ManagedBase import create_properties [as 别名]
def create_properties(self):
ManagedBase.create_properties(self)
panel = wx.Panel(self.notebook, -1)
self.properties["bitmap"].display(panel)
self.properties["disabled_bitmap"].display(panel)
self.properties["default"].display(panel)
self.properties["style"].display(panel)
szr = wx.BoxSizer(wx.VERTICAL)
szr.Add(self.properties["bitmap"].panel, 0, wx.EXPAND)
szr.Add(self.properties["disabled_bitmap"].panel, 0, wx.EXPAND)
szr.Add(self.properties["default"].panel, 0, wx.EXPAND)
szr.Add(self.properties["style"].panel, 0, wx.EXPAND)
panel.SetAutoLayout(True)
panel.SetSizer(szr)
szr.Fit(panel)
self.notebook.AddPage(panel, "Widget")
示例12: create_properties
# 需要导入模块: from edit_windows import ManagedBase [as 别名]
# 或者: from edit_windows.ManagedBase import create_properties [as 别名]
def create_properties(self):
ManagedBase.create_properties(self)
panel = wx.Panel(self.notebook, -1)
self.properties['label'].display(panel)
self.properties['stockitem'].display(panel)
self.properties['default'].display(panel)
self.properties['style'].display(panel)
szr = wx.BoxSizer(wx.VERTICAL)
szr.Add(self.properties['label'].panel, 0, wx.EXPAND)
szr.Add(self.properties['stockitem'].panel, 0, wx.EXPAND)
szr.Add(self.properties['default'].panel, 0, wx.EXPAND)
szr.Add(self.properties['style'].panel, 0, wx.EXPAND)
panel.SetAutoLayout(1)
panel.SetSizer(szr)
szr.Fit(panel)
self.notebook.AddPage(panel, 'Widget')
if self.stockitem != "None":
s = common.app_tree.app.saved
self.set_stockitem(self.stockitem)
common.app_tree.app.saved = s
示例13: create_properties
# 需要导入模块: from edit_windows import ManagedBase [as 别名]
# 或者: from edit_windows.ManagedBase import create_properties [as 别名]
def create_properties(self):
ManagedBase.create_properties(self)
page = self.notebook.GetPage(1)
wp = self.properties["width"]
hp = self.properties["height"]
wp.display(page)
hp.display(page)
szr = page.GetSizer()
szr.Insert(0, hp.panel, 0, wx.EXPAND)
szr.Insert(0, wp.panel, 0, wx.EXPAND)
szr.Layout()
szr.Fit(page)
import math
w, h = page.GetClientSize()
page.SetScrollbars(1, 5, 1, int(math.ceil(h / 5.0)))
common_page = self.notebook.GetPage(0)
common_page.Hide()
self.notebook.RemovePage(0)
self.notebook.SetSelection(0)
示例14: create_properties
# 需要导入模块: from edit_windows import ManagedBase [as 别名]
# 或者: from edit_windows.ManagedBase import create_properties [as 别名]
def create_properties(self):
ManagedBase.create_properties(self)
panel = wx.ScrolledWindow(self.notebook, -1, style=wx.TAB_TRAVERSAL)
szr = wx.BoxSizer(wx.VERTICAL)
self.properties['choices'].display(panel)
self.properties['style'].display(panel)
self.properties['selection'].display(panel)
szr.Add(self.properties['style'].panel, 0, wx.EXPAND)
szr.Add(self.properties['selection'].panel, 0, wx.EXPAND)
ch = self.properties['choices'].panel
ch.SetSize((ch.GetSize()[0]-20, 200))
szr.Add(self.properties['choices'].panel, 1, wx.ALL|wx.EXPAND, 5)
panel.SetAutoLayout(True)
panel.SetSizer(szr)
szr.Fit(panel)
w, h = panel.GetSize()
from math import ceil
panel.SetScrollbars(5, 5, int(ceil(w/5.0)), int(ceil(h/5.0)))
self.notebook.AddPage(panel, 'Widget')
self.properties['choices'].set_col_sizes([-1])