本文整理汇总了Python中wx.TOP属性的典型用法代码示例。如果您正苦于以下问题:Python wx.TOP属性的具体用法?Python wx.TOP怎么用?Python wx.TOP使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类wx
的用法示例。
在下文中一共展示了wx.TOP属性的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: import wx [as 别名]
# 或者: from wx import TOP [as 别名]
def __init__(self, parent, text, title):
wx.Dialog.__init__(self, parent, -1, title,
style = wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER)
vsizer = wx.BoxSizer(wx.VERTICAL)
tc = wx.TextCtrl(self, -1, size = wx.Size(400, 200),
style = wx.TE_MULTILINE | wx.TE_READONLY | wx.TE_LINEWRAP)
tc.SetValue(text)
vsizer.Add(tc, 1, wx.EXPAND);
vsizer.Add(wx.StaticLine(self, -1), 0, wx.EXPAND | wx.TOP | wx.BOTTOM, 5)
okBtn = gutil.createStockButton(self, "OK")
vsizer.Add(okBtn, 0, wx.ALIGN_CENTER)
util.finishWindow(self, vsizer)
wx.EVT_BUTTON(self, okBtn.GetId(), self.OnOK)
okBtn.SetFocus()
示例2: __init__
# 需要导入模块: import wx [as 别名]
# 或者: from wx import TOP [as 别名]
def __init__(self, targetfig):
wx.Frame.__init__(self, None, -1, "Configure subplots")
toolfig = Figure((6,3))
canvas = FigureCanvasWx(self, -1, toolfig)
# Create a figure manager to manage things
figmgr = FigureManager(canvas, 1, self)
# Now put all into a sizer
sizer = wx.BoxSizer(wx.VERTICAL)
# This way of adding to sizer allows resizing
sizer.Add(canvas, 1, wx.LEFT|wx.TOP|wx.GROW)
self.SetSizer(sizer)
self.Fit()
tool = SubplotTool(targetfig, toolfig)
示例3: configure_subplots
# 需要导入模块: import wx [as 别名]
# 或者: from wx import TOP [as 别名]
def configure_subplots(self, evt):
frame = wx.Frame(None, -1, "Configure subplots")
toolfig = Figure((6,3))
canvas = self.get_canvas(frame, toolfig)
# Create a figure manager to manage things
figmgr = FigureManager(canvas, 1, frame)
# Now put all into a sizer
sizer = wx.BoxSizer(wx.VERTICAL)
# This way of adding to sizer allows resizing
sizer.Add(canvas, 1, wx.LEFT|wx.TOP|wx.GROW)
frame.SetSizer(sizer)
frame.Fit()
tool = SubplotTool(self.canvas.figure, toolfig)
frame.Show()
示例4: configure_subplots
# 需要导入模块: import wx [as 别名]
# 或者: from wx import TOP [as 别名]
def configure_subplots(self, evt):
global FigureManager # placates pyflakes: created by @_Backend.export
frame = wx.Frame(None, -1, "Configure subplots")
_set_frame_icon(frame)
toolfig = Figure((6, 3))
canvas = self.get_canvas(frame, toolfig)
# Create a figure manager to manage things
FigureManager(canvas, 1, frame)
# Now put all into a sizer
sizer = wx.BoxSizer(wx.VERTICAL)
# This way of adding to sizer allows resizing
sizer.Add(canvas, 1, wx.LEFT | wx.TOP | wx.GROW)
frame.SetSizer(sizer)
frame.Fit()
SubplotTool(self.canvas.figure, toolfig)
frame.Show()
示例5: __init__
# 需要导入模块: import wx [as 别名]
# 或者: from wx import TOP [as 别名]
def __init__(self, targetfig):
global FigureManager # placates pyflakes: created by @_Backend.export
wx.Frame.__init__(self, None, -1, "Configure subplots")
toolfig = Figure((6, 3))
canvas = FigureCanvasWx(self, -1, toolfig)
# Create a figure manager to manage things
figmgr = FigureManager(canvas, 1, self)
# Now put all into a sizer
sizer = wx.BoxSizer(wx.VERTICAL)
# This way of adding to sizer allows resizing
sizer.Add(canvas, 1, wx.LEFT | wx.TOP | wx.GROW)
self.SetSizer(sizer)
self.Fit()
tool = SubplotTool(targetfig, toolfig)
示例6: configure_subplots
# 需要导入模块: import wx [as 别名]
# 或者: from wx import TOP [as 别名]
def configure_subplots(self, evt):
global FigureManager # placates pyflakes: created by @_Backend.export
frame = wx.Frame(None, -1, "Configure subplots")
_set_frame_icon(frame)
toolfig = Figure((6, 3))
canvas = self.get_canvas(frame, toolfig)
# Create a figure manager to manage things
figmgr = FigureManager(canvas, 1, frame)
# Now put all into a sizer
sizer = wx.BoxSizer(wx.VERTICAL)
# This way of adding to sizer allows resizing
sizer.Add(canvas, 1, wx.LEFT | wx.TOP | wx.GROW)
frame.SetSizer(sizer)
frame.Fit()
tool = SubplotTool(self.canvas.figure, toolfig)
frame.Show()
示例7: __init__
# 需要导入模块: import wx [as 别名]
# 或者: from wx import TOP [as 别名]
def __init__(self):
wx.Frame.__init__(self, None, -1,
'CanvasFrame', size=(550, 350))
self.figure = Figure()
self.axes = self.figure.add_subplot(111)
t = np.arange(0.0, 3.0, 0.01)
s = np.sin(2 * np.pi * t)
self.axes.plot(t, s)
self.canvas = FigureCanvas(self, -1, self.figure)
self.sizer = wx.BoxSizer(wx.VERTICAL)
self.sizer.Add(self.canvas, 1, wx.LEFT | wx.TOP | wx.EXPAND)
self.SetSizer(self.sizer)
self.Fit()
self.add_toolbar() # comment this out for no toolbar
示例8: _set_layout
# 需要导入模块: import wx [as 别名]
# 或者: from wx import TOP [as 别名]
def _set_layout(self):
main_sizer = wx.BoxSizer(wx.HORIZONTAL)
vertical_sizer = wx.BoxSizer(wx.VERTICAL)
vertical_sizer.Add(self.video_formats_label)
vertical_sizer.Add(self.video_formats_checklistbox, 1, wx.EXPAND | wx.ALL, border=5)
vertical_sizer.Add(self.audio_formats_label, flag=wx.TOP, border=5)
vertical_sizer.Add(self.audio_formats_checklistbox, 1, wx.EXPAND | wx.ALL, border=5)
vertical_sizer.Add(self.post_proc_opts_label, flag=wx.TOP, border=5)
vertical_sizer.Add(self.keep_video_checkbox, flag=wx.ALL, border=5)
vertical_sizer.Add(self.extract_audio_checkbox, flag=wx.LEFT | wx.RIGHT | wx.BOTTOM, border=5)
vertical_sizer.Add(self.embed_thumbnail_checkbox, flag=wx.LEFT | wx.RIGHT | wx.BOTTOM, border=5)
vertical_sizer.Add(self.add_metadata_checkbox, flag=wx.LEFT | wx.RIGHT | wx.BOTTOM, border=5)
audio_quality_sizer = wx.BoxSizer(wx.HORIZONTAL)
audio_quality_sizer.Add(self.audio_quality_label, flag=wx.ALIGN_CENTER_VERTICAL)
audio_quality_sizer.AddSpacer((20, -1))
audio_quality_sizer.Add(self.audio_quality_combobox)
vertical_sizer.Add(audio_quality_sizer, flag=wx.LEFT | wx.RIGHT | wx.BOTTOM, border=5)
main_sizer.Add(vertical_sizer, 1, wx.EXPAND | wx.ALL, border=5)
self.SetSizer(main_sizer)
示例9: __init__
# 需要导入模块: import wx [as 别名]
# 或者: from wx import TOP [as 别名]
def __init__(self, parent):
wx.Frame.__init__(self, parent)
self.figure = Figure()
self.axes = self.figure.add_subplot(111)
self.canvas = FigureCanvas(self, -1, self.figure)
self.sizer = wx.BoxSizer(wx.VERTICAL)
self.sizer.Add(self.canvas, 1, wx.LEFT | wx.TOP | wx.GROW)
self.SetSizer(self.sizer)
self.Fit()
self.distances = []
self.elevations = []
self.point_distances = []
self.point_elevations = []
self.limx = [0, 1]
self.limy = [0, 1]
self.ticks = 1
示例10: __init__
# 需要导入模块: import wx [as 别名]
# 或者: from wx import TOP [as 别名]
def __init__(self):
wx.Frame.__init__(self, None, -1, 'CanvasFrame', size=(550, 350))
if sys.version_info[0] == 3:
color = wx.Colour("WHITE")
else:
color = wx.NamedColour("WHITE")
self.SetBackgroundColour(color)
self.figure = Figure()
self.axes = self.figure.add_subplot(111)
t = arange(0.0, 3.0, 0.01)
s = sin(2 * pi * t)
self.axes.plot(t, s)
self.canvas = FigureCanvas(self, -1, self.figure)
self.sizer = wx.BoxSizer(wx.VERTICAL)
self.sizer.Add(self.canvas, 1, wx.LEFT | wx.TOP | wx.GROW)
self.SetSizerAndFit(self.sizer)
self.add_toolbar()
示例11: __init__
# 需要导入模块: import wx [as 别名]
# 或者: from wx import TOP [as 别名]
def __init__(self, name, parent, index, label):
# Initialise parent classes
ManagedBase.__init__(self, name, parent, index)
EditStylesMixin.__init__(self)
BitmapMixin.__init__(self)
# initialise instance properties
self.label = np.TextProperty(label, default_value="", multiline="grow")
self.default = np.CheckBoxProperty(False, default_value=False)
self.stockitem = np.ListBoxPropertyD(self.STOCKITEMS[0], choices=self.STOCKITEMS)
self.bitmap = np.BitmapPropertyD(min_version=(3,0))
self.disabled_bitmap = np.BitmapPropertyD(min_version=(3,0))
self.pressed_bitmap = np.BitmapPropertyD(min_version=(3,0))
self.current_bitmap = np.BitmapPropertyD(min_version=(3,0))
self.focus_bitmap = np.BitmapPropertyD(min_version=(3,0))
values = [wx.LEFT, wx.RIGHT, wx.TOP, wx.BOTTOM]
aliases = ["wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM"]
p = self.bitmap_dir = np.RadioProperty(wx.LEFT, values, columns=4, aliases=aliases, default_value=wx.LEFT)
p.min_version = (3,0)
p.blocked = True
示例12: __init__
# 需要导入模块: import wx [as 别名]
# 或者: from wx import TOP [as 别名]
def __init__(self, parent, title):
wx.Dialog.__init__(self, parent, -1, title)
self.sizer = sizer = wx.BoxSizer(wx.VERTICAL)
self.message = wx.StaticText(self, -1, "")
sizer.Add(self.message, 0, wx.TOP | wx.LEFT | wx.RIGHT | wx.EXPAND, 10)
self.choices = wx.CheckListBox(self, -1, choices=[])
sizer.Add(self.choices, 1, wx.EXPAND | wx.LEFT | wx.RIGHT, 10)
sizer.Add(wx.StaticLine(self, -1), 0, wx.EXPAND | wx.ALL, 10)
sz2 = wx.BoxSizer(wx.HORIZONTAL)
sz2.Add(wx.Button(self, wx.ID_OK, ""), 0, wx.ALL, 10)
sz2.Add(wx.Button(self, wx.ID_CANCEL, ""), 0, wx.ALL, 10)
sizer.Add(sz2, 0, wx.ALIGN_CENTER)
self.SetAutoLayout(True)
self.SetSizer(sizer)
sizer.Fit(self)
self.CenterOnScreen()
示例13: _create_base_layout
# 需要导入模块: import wx [as 别名]
# 或者: from wx import TOP [as 别名]
def _create_base_layout(self):
"""Create generic layout
This method sets up a basic layout that is common to all GUIs, such
as a live stream of the camera (capture device). This stream is
assigned to the variable self.pnl, and arranged in a vertical
layout self.panels_vertical.
Additional layout elements can be added below the livestream by
means of the method self.panels_vertical.Add.
"""
# set up video stream
self.pnl = wx.Panel(self, -1, size=(self.imgWidth, self.imgHeight))
self.pnl.SetBackgroundColour(wx.BLACK)
# display the button layout beneath the video stream
self.panels_vertical = wx.BoxSizer(wx.VERTICAL)
self.panels_vertical.Add(self.pnl, 1, flag=wx.EXPAND | wx.TOP,
border=1)
# allow for custom layout modifications
self._create_custom_layout()
# round off the layout by expanding and centering
self.SetMinSize((self.imgWidth, self.imgHeight))
self.SetSizer(self.panels_vertical)
self.Centre()
示例14: addCheckBox
# 需要导入模块: import wx [as 别名]
# 或者: from wx import TOP [as 别名]
def addCheckBox(self, name, parent, sizer, pad):
cb = wx.CheckBox(parent, -1, name)
wx.EVT_CHECKBOX(self, cb.GetId(), self.OnMisc)
sizer.Add(cb, 0, wx.TOP, pad)
setattr(self, name.lower() + "Cb", cb)