本文整理汇总了Python中wx.SL_HORIZONTAL属性的典型用法代码示例。如果您正苦于以下问题:Python wx.SL_HORIZONTAL属性的具体用法?Python wx.SL_HORIZONTAL怎么用?Python wx.SL_HORIZONTAL使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类wx
的用法示例。
在下文中一共展示了wx.SL_HORIZONTAL属性的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: addCheckBoxSlider
# 需要导入模块: import wx [as 别名]
# 或者: from wx import SL_HORIZONTAL [as 别名]
def addCheckBoxSlider(self, bodyparts, fileIndex, markersize):
"""
Adds checkbox and a slider
"""
self.choiceBox = wx.BoxSizer(wx.VERTICAL)
self.slider = wx.Slider(
self,
-1,
markersize,
1,
markersize * 3,
size=(250, -1),
style=wx.SL_HORIZONTAL | wx.SL_AUTOTICKS | wx.SL_LABELS,
)
self.slider.Enable(False)
self.checkBox = wx.CheckBox(self, id=wx.ID_ANY, label="Adjust marker size.")
self.choiceBox.Add(self.slider, 0, wx.ALL, 5)
self.choiceBox.Add(self.checkBox, 0, wx.ALL, 5)
self.SetSizerAndFit(self.choiceBox)
self.Layout()
return (self.choiceBox, self.slider, self.checkBox)
示例2: createControls
# 需要导入模块: import wx [as 别名]
# 或者: from wx import SL_HORIZONTAL [as 别名]
def createControls(self):
# all buttons open dlg to add parameters (e.g. IP,
self.getMARTASButton = wx.Button(self,-1,"Connect to MARTAS", size=(160,30))
self.getMARCOSButton = wx.Button(self,-1,"Connect to MARCOS", size=(160,30))
#self.getMQTTButton = wx.Button(self,-1,"Connect to MQTT", size=(160,30))
self.martasLabel = wx.TextCtrl(self, value="not connected", size=(160,30), style=wx.TE_RICH) # red bg
self.marcosLabel = wx.TextCtrl(self, value="not connected", size=(160,30), style=wx.TE_RICH) # red bg
#self.mqttLabel = wx.TextCtrl(self, value="not connected", size=(160,30), style=wx.TE_RICH) # red bg
self.marcosLabel.SetEditable(False)
self.martasLabel.SetEditable(False)
#self.mqttLabel.SetEditable(False)
# Parameters if connection is established
#
self.coverageLabel = wx.StaticText(self, label="Plot coverage (sec):", size=(160,30))
self.coverageTextCtrl = wx.TextCtrl(self, value="600", size=(160,30))
self.sliderLabel = wx.StaticText(self, label="Update period (sec):", size=(160,30))
self.frequSlider = wx.Slider(self, -1, 10, 1, 60, (-1, -1), (100, -1),
wx.SL_AUTOTICKS | wx.SL_HORIZONTAL | wx.SL_LABELS)
self.startMonitorButton = wx.Button(self,-1,"Start Monitor", size=(160,30)) # if started then everything else will be disabled ..... except save monitor
self.stopMonitorButton = wx.Button(self,-1,"Stop Monitor", size=(160,30))
self.saveMonitorButton = wx.Button(self,-1,"Log data*", size=(160,30)) # produces a bin file
#self.startMonitorButton.Disable()
self.saveMonitorButton.Disable()
# Connection Log
#
self.connectionLogLabel = wx.StaticText(self, label="Connection Log:")
self.connectionLogTextCtrl = wx.TextCtrl(self, wx.ID_ANY, size=(330,300),
style = wx.TE_MULTILINE|wx.TE_READONLY|wx.HSCROLL|wx.VSCROLL)
示例3: createControls
# 需要导入模块: import wx [as 别名]
# 或者: from wx import SL_HORIZONTAL [as 别名]
def createControls(self):
self.selectPortButton = wx.Button(self,-1,"Select MARTAS")
self.portnameTextCtrl = wx.TextCtrl(self, value="coming soon")
self.portnameTextCtrl.Disable()
self.sliderLabel = wx.StaticText(self, label="Update frequency:")
self.frequSlider = wx.Slider(self, -1, 10, 1, 20, (-1, -1), (100, -1),
wx.SL_AUTOTICKS | wx.SL_HORIZONTAL | wx.SL_LABELS)
self.startMonitorButton = wx.Button(self,-1,"Start Monitor")
self.stopMonitorButton = wx.Button(self,-1,"Stop Monitor")
self.startMonitorButton.Disable()
self.stopMonitorButton.Disable()
示例4: SK_Slider
# 需要导入模块: import wx [as 别名]
# 或者: from wx import SL_HORIZONTAL [as 别名]
def SK_Slider(self,index,get_label,get_start,get_min,get_max,get_factor,get_offset):
self.Slider.append([])
self.Slider_v.append([])
self.HSlider.append([])
self.Slider_list.append([index,get_label,get_start,get_min,get_max,get_factor,get_offset,False])
self.Slider[index]= wx.CheckBox(self.panel, label=get_label)
self.Slider_v[index] = wx.Slider(self.panel, -1, get_start, get_min, get_max, (-1,-1), (250, -1), wx.SL_AUTOTICKS | wx.SL_HORIZONTAL | wx.SL_VALUE_LABEL)
self.HSlider[index] = wx.BoxSizer(wx.HORIZONTAL)
self.HSlider[index].Add(self.Slider[index], 0, wx.ALL|wx.EXPAND, 5)
self.HSlider[index].Add((0,0), 1, wx.ALL|wx.EXPAND, 0)
self.HSlider[index].Add(self.Slider_v[index], 0, wx.ALL|wx.EXPAND, 5)
self.vbox.Add(self.HSlider[index], 0, wx.ALL|wx.EXPAND, 5)
示例5: SK_Slider_conf
# 需要导入模块: import wx [as 别名]
# 或者: from wx import SL_HORIZONTAL [as 别名]
def SK_Slider_conf(self,index,get_label,get_start,get_min,get_max,get_factor,get_offset):
self.Slider.append([])
self.Slider_v.append([])
self.HSlider.append([])
self.Slider[index]= wx.CheckBox(self.panel, label=get_label)
self.Slider_v[index] = wx.Slider(self.panel, -1, get_start, get_min, get_max, (-1,-1), (250, -1), wx.SL_AUTOTICKS | wx.SL_HORIZONTAL | wx.SL_VALUE_LABEL)
self.HSlider[index] = wx.BoxSizer(wx.HORIZONTAL)
self.HSlider[index].Add(self.Slider[index], 0, wx.ALL|wx.EXPAND, 5)
self.HSlider[index].Add((0,0), 1, wx.ALL|wx.EXPAND, 0)
self.HSlider[index].Add(self.Slider_v[index], 0, wx.ALL|wx.EXPAND, 5)
self.vbox.Add(self.HSlider[index], 0, wx.ALL|wx.EXPAND, 5)
示例6: addCheckBoxSlider
# 需要导入模块: import wx [as 别名]
# 或者: from wx import SL_HORIZONTAL [as 别名]
def addCheckBoxSlider(self, bodyparts, fileIndex, markersize):
"""
Adds checkbox and a slider
"""
self.choiceBox = wx.BoxSizer(wx.VERTICAL)
self.slider = wx.Slider(
self,
-1,
markersize,
1,
markersize * 3,
size=(250, -1),
style=wx.SL_HORIZONTAL | wx.SL_AUTOTICKS | wx.SL_LABELS,
)
self.slider.Enable(False)
self.checkBox = wx.CheckBox(self, id=wx.ID_ANY, label="Adjust marker size.")
self.choiceBox.Add(self.slider, 0, wx.ALL, 5)
self.choiceBox.Add(self.checkBox, 0, wx.ALL, 5)
names = ["Color individuals", "Color bodyparts"]
self.visualization_radiobox = wx.RadioBox(
self,
label="Select the visualization scheme",
majorDimension=1,
style=wx.RA_SPECIFY_COLS,
choices=names,
)
self.choiceBox.Add(self.visualization_radiobox, 0, wx.EXPAND | wx.ALL, 10)
self.SetSizerAndFit(self.choiceBox)
self.Layout()
return (self.choiceBox, self.slider, self.checkBox, self.visualization_radiobox)
示例7: addRadioButtons
# 需要导入模块: import wx [as 别名]
# 或者: from wx import SL_HORIZONTAL [as 别名]
def addRadioButtons(self, bodyparts, fileIndex, markersize):
"""
Adds radio buttons for each bodypart on the right panel
"""
self.choiceBox = wx.BoxSizer(wx.VERTICAL)
choices = [l for l in bodyparts]
self.fieldradiobox = wx.RadioBox(
self,
label="Select a bodypart to label",
style=wx.RA_SPECIFY_ROWS,
choices=choices,
)
self.slider = wx.Slider(
self,
-1,
markersize,
1,
markersize * 3,
size=(250, -1),
style=wx.SL_HORIZONTAL | wx.SL_AUTOTICKS | wx.SL_LABELS,
)
self.slider.Enable(False)
self.checkBox = wx.CheckBox(self, id=wx.ID_ANY, label="Adjust marker size.")
self.choiceBox.Add(self.slider, 0, wx.ALL, 5)
self.choiceBox.Add(self.checkBox, 0, wx.ALL, 5)
self.choiceBox.Add(self.fieldradiobox, 0, wx.EXPAND | wx.ALL, 10)
self.SetSizerAndFit(self.choiceBox)
self.Layout()
return (self.choiceBox, self.fieldradiobox, self.slider, self.checkBox)
示例8: addRadioButtons
# 需要导入模块: import wx [as 别名]
# 或者: from wx import SL_HORIZONTAL [as 别名]
def addRadioButtons(self, bodyparts, individual_names, fileIndex, markersize):
"""
Adds radio buttons for each bodypart on the right panel
"""
self.choiceBox = wx.BoxSizer(wx.VERTICAL)
choices = [l for l in bodyparts]
self.fieldradiobox = wx.RadioBox(
self,
label="Select a bodypart to label",
majorDimension=3,
style=wx.RA_SPECIFY_COLS,
choices=choices,
)
self.change_marker = wx.Slider(
self,
-1,
markersize,
1,
markersize * 3,
size=(250, -1),
style=wx.SL_HORIZONTAL | wx.SL_AUTOTICKS | wx.SL_LABELS,
)
self.change_marker.Enable(False)
names = [k for k in individual_names]
self.individualradiobox = wx.RadioBox(
self,
label="Select an individual",
majorDimension=3,
style=wx.RA_SPECIFY_COLS,
choices=names,
)
self.checkBox = wx.CheckBox(self, id=wx.ID_ANY, label="Adjust marker size")
self.choiceBox.Add(self.change_marker, 0, wx.ALL, 5)
self.choiceBox.Add(self.checkBox, 0, wx.ALL, 5)
self.choiceBox.Add(self.individualradiobox, 0, wx.EXPAND | wx.ALL, 10)
self.choiceBox.Add(self.fieldradiobox, 0, wx.EXPAND | wx.ALL, 10)
self.SetSizerAndFit(self.choiceBox)
self.Layout()
return (
self.choiceBox,
self.individualradiobox,
self.fieldradiobox,
self.change_marker,
self.checkBox,
)
示例9: __init__
# 需要导入模块: import wx [as 别名]
# 或者: from wx import SL_HORIZONTAL [as 别名]
def __init__(self, *args, **kwds):
# begin wxGlade: Alignment.__init__
kwds["style"] = kwds.get("style", 0) | wx.DEFAULT_FRAME_STYLE | wx.FRAME_TOOL_WINDOW | wx.STAY_ON_TOP
wx.Frame.__init__(self, *args, **kwds)
Module.__init__(self)
self.SetSize((631, 365))
self.spin_vertical_distance = wx.SpinCtrl(self, wx.ID_ANY, "180", min=10, max=400)
self.spin_vertical_power = wx.SpinCtrl(self, wx.ID_ANY, "180", min=10, max=500)
self.check_vertical_done = wx.CheckBox(self, wx.ID_ANY, _("Vertical Alignment Finished"))
self.spin_horizontal_distance = wx.SpinCtrl(self, wx.ID_ANY, "220", min=10, max=400)
self.spin_horizontal_power = wx.SpinCtrl(self, wx.ID_ANY, "180", min=10, max=500)
self.check_horizontal_done = wx.CheckBox(self, wx.ID_ANY, _("Horizontal Alignment Finished"))
self.slider_square_power = wx.Slider(self, wx.ID_ANY, 200, 0, 1000, style=wx.SL_HORIZONTAL | wx.SL_LABELS)
self.button_vertical_align_nearfar = wx.BitmapButton(self, wx.ID_ANY, icons8_resize_vertical_50.GetBitmap())
self.button_horizontal_align_nearfar = wx.BitmapButton(self, wx.ID_ANY, icons8_resize_horizontal_50.GetBitmap())
self.button_vertical_align = wx.BitmapButton(self, wx.ID_ANY, icons8_resize_vertical_50.GetBitmap())
self.button_horizontal_align = wx.BitmapButton(self, wx.ID_ANY, icons8_resize_horizontal_50.GetBitmap())
self.button_square_align_4_corner = wx.BitmapButton(self, wx.ID_ANY, icons8_stop_50.GetBitmap())
self.button_square_align = wx.BitmapButton(self, wx.ID_ANY, icons8_stop_50.GetBitmap())
self.__set_properties()
self.__do_layout()
self.Bind(wx.EVT_BUTTON, self.on_button_vertical_align_nearfar, self.button_vertical_align_nearfar)
self.Bind(wx.EVT_BUTTON, self.on_button_vertical_align, self.button_vertical_align)
self.Bind(wx.EVT_SPINCTRL, self.on_spin_vertical_distance, self.spin_vertical_distance)
self.Bind(wx.EVT_TEXT, self.on_spin_vertical_distance, self.spin_vertical_distance)
self.Bind(wx.EVT_TEXT_ENTER, self.on_spin_vertical_distance, self.spin_vertical_distance)
self.Bind(wx.EVT_SPINCTRL, self.on_spin_vertical_power, self.spin_vertical_power)
self.Bind(wx.EVT_TEXT, self.on_spin_vertical_power, self.spin_vertical_power)
self.Bind(wx.EVT_TEXT_ENTER, self.on_spin_vertical_power, self.spin_vertical_power)
self.Bind(wx.EVT_CHECKBOX, self.on_check_vertical_done, self.check_vertical_done)
self.Bind(wx.EVT_BUTTON, self.on_button_horizontal_align_nearfar, self.button_horizontal_align_nearfar)
self.Bind(wx.EVT_BUTTON, self.on_button_horizontal_align, self.button_horizontal_align)
self.Bind(wx.EVT_SPINCTRL, self.on_spin_horizontal_distance, self.spin_horizontal_distance)
self.Bind(wx.EVT_TEXT, self.on_spin_horizontal_distance, self.spin_horizontal_distance)
self.Bind(wx.EVT_TEXT_ENTER, self.on_spin_horizontal_distance, self.spin_horizontal_distance)
self.Bind(wx.EVT_SPINCTRL, self.on_spin_horizontal_power, self.spin_horizontal_power)
self.Bind(wx.EVT_TEXT, self.on_spin_horizontal_power, self.spin_horizontal_power)
self.Bind(wx.EVT_TEXT_ENTER, self.on_spin_horizontal_power, self.spin_horizontal_power)
self.Bind(wx.EVT_CHECKBOX, self.on_check_horizontal_done, self.check_horizontal_done)
self.Bind(wx.EVT_BUTTON, self.on_button_square_align_4_corners, self.button_square_align_4_corner)
self.Bind(wx.EVT_BUTTON, self.on_button_square_align, self.button_square_align)
self.Bind(wx.EVT_COMMAND_SCROLL, self.on_slider_square_power_change, self.slider_square_power)
self.Bind(wx.EVT_COMMAND_SCROLL_CHANGED, self.on_slider_square_power_change, self.slider_square_power)
self.Bind(wx.EVT_CLOSE, self.on_close, self)