本文整理汇总了Python中wx.LIST_FORMAT_LEFT属性的典型用法代码示例。如果您正苦于以下问题:Python wx.LIST_FORMAT_LEFT属性的具体用法?Python wx.LIST_FORMAT_LEFT怎么用?Python wx.LIST_FORMAT_LEFT使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类wx
的用法示例。
在下文中一共展示了wx.LIST_FORMAT_LEFT属性的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: import wx [as 别名]
# 或者: from wx import LIST_FORMAT_LEFT [as 别名]
def __init__(self, *args, **kwds):
# begin wxGlade: MyFrame.__init__
kwds["style"] = kwds.get("style", 0) | wx.DEFAULT_FRAME_STYLE
wx.Frame.__init__(self, *args, **kwds)
self.SetTitle("frame")
sizer_1 = wx.BoxSizer(wx.VERTICAL)
self.list_ctrl_1 = wx.ListCtrl(self, wx.ID_ANY, style=wx.LC_HRULES | wx.LC_REPORT | wx.LC_VRULES)
self.list_ctrl_1.InsertColumn(0, "A", format=wx.LIST_FORMAT_LEFT, width=-1)
self.list_ctrl_1.InsertColumn(1, "B", format=wx.LIST_FORMAT_LEFT, width=-1)
self.list_ctrl_1.InsertColumn(2, "C", format=wx.LIST_FORMAT_LEFT, width=-1)
self.list_ctrl_1.InsertColumn(3, "D", format=wx.LIST_FORMAT_LEFT, width=-1)
sizer_1.Add(self.list_ctrl_1, 1, wx.EXPAND, 0)
self.SetSizer(sizer_1)
sizer_1.Fit(self)
self.Layout()
# end wxGlade
# end of class MyFrame
示例2: __init__
# 需要导入模块: import wx [as 别名]
# 或者: from wx import LIST_FORMAT_LEFT [as 别名]
def __init__(self, *args, **kwds):
# begin wxGlade: MyFrame.__init__
kwds["style"] = kwds.get("style", 0) | wx.DEFAULT_FRAME_STYLE
wx.Frame.__init__(self, *args, **kwds)
self.SetTitle("frame")
sizer_1 = wx.BoxSizer(wx.VERTICAL)
self.list_ctrl_1 = wx.ListCtrl(self, wx.ID_ANY, style=wx.LC_HRULES | wx.LC_REPORT | wx.LC_VRULES)
self.list_ctrl_1.AppendColumn("A", format=wx.LIST_FORMAT_LEFT, width=-1)
self.list_ctrl_1.AppendColumn("B", format=wx.LIST_FORMAT_LEFT, width=-1)
self.list_ctrl_1.AppendColumn("C", format=wx.LIST_FORMAT_LEFT, width=-1)
self.list_ctrl_1.AppendColumn("D", format=wx.LIST_FORMAT_LEFT, width=-1)
sizer_1.Add(self.list_ctrl_1, 1, wx.EXPAND, 0)
self.SetSizer(sizer_1)
sizer_1.Fit(self)
self.Layout()
# end wxGlade
# end of class MyFrame
示例3: __set_properties
# 需要导入模块: import wx [as 别名]
# 或者: from wx import LIST_FORMAT_LEFT [as 别名]
def __set_properties(self):
# begin wxGlade: DeviceManager.__set_properties
self.SetTitle("Device Manager")
self.devices_list.SetFont(wx.Font(13, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, 0, "Segoe UI"))
self.devices_list.AppendColumn(_("Id"), format=wx.LIST_FORMAT_LEFT, width=72)
self.devices_list.AppendColumn(_("Driver"), format=wx.LIST_FORMAT_LEFT, width=119)
self.devices_list.AppendColumn(_("State"), format=wx.LIST_FORMAT_LEFT, width=127)
self.devices_list.AppendColumn(_("Location"), format=wx.LIST_FORMAT_LEFT, width=258)
self.devices_list.AppendColumn(_("Boot"), format=wx.LIST_FORMAT_LEFT, width=51)
self.new_device_button.SetToolTip(_("Add a new device"))
self.new_device_button.SetSize(self.new_device_button.GetBestSize())
self.remove_device_button.SetToolTip(_("Remove selected device"))
self.remove_device_button.SetSize(self.remove_device_button.GetBestSize())
self.device_properties_button.SetToolTip(_("View Device Properties"))
self.device_properties_button.SetSize(self.device_properties_button.GetBestSize())
self.move_item_up_button.SetToolTip(_("Move device up"))
self.move_item_up_button.SetSize(self.move_item_up_button.GetBestSize())
self.move_item_down_button.SetToolTip(_("Move device down"))
self.move_item_down_button.SetSize(self.move_item_down_button.GetBestSize())
# end wxGlade
示例4: AddColumnInfo
# 需要导入模块: import wx [as 别名]
# 或者: from wx import LIST_FORMAT_LEFT [as 别名]
def AddColumnInfo(self, text, size=-1, colname=None, format=wx.LIST_FORMAT_LEFT, proc=None):
self.AddColumn(text, size, format)
self.AddExtractorInfo(colname, proc)
示例5: AddColumn
# 需要导入模块: import wx [as 别名]
# 或者: from wx import LIST_FORMAT_LEFT [as 别名]
def AddColumn(self, text, size=-1, format=wx.LIST_FORMAT_LEFT):
if size in [None, -1, wx.LIST_AUTOSIZE]:
# size=wx.LIST_AUTOSIZE
size=self.GetClientSize().GetWidth();
for i in range(self.GetColumnCount()):
size -= self.GetColumnWidth(i)
elif size > 0:
size=self.convert(size) + self.MARGIN
if not self.GetColumnCount():
size += self.ICONWITDH
return self.InsertColumn(self.GetColumnCount(), text, format, size);
示例6: CreateColumns
# 需要导入模块: import wx [as 别名]
# 或者: from wx import LIST_FORMAT_LEFT [as 别名]
def CreateColumns(self, left, right=None, leftSize=-1):
if right != None:
if leftSize < 0:
leftSize=rightSize=self.GetClientSize().GetWidth()/2;
self.InsertColumn(0, left, wx.LIST_FORMAT_LEFT, leftSize);
self.InsertColumn(1, right - self.ICONWIDTH, wx.LIST_FORMAT_LEFT, rightSize);
else:
self.AddColumn(left, leftSize)
self.AddColumn(right, -1)
else:
self.AddColumn(left, -1)
示例7: initColumn
# 需要导入模块: import wx [as 别名]
# 或者: from wx import LIST_FORMAT_LEFT [as 别名]
def initColumn(self):
self.AppendColumn('Q', format=wx.LIST_FORMAT_RIGHT, width=50)
self.AppendColumn('分辨率', format=wx.LIST_FORMAT_CENTER, width=80)
self.AppendColumn('N', format=wx.LIST_FORMAT_RIGHT, width=40)
self.AppendColumn('视频大小', width=80, format=wx.LIST_FORMAT_RIGHT)
self.AppendColumn('音频', width=50, format=wx.LIST_FORMAT_CENTER)
self.AppendColumn('格式', width=50, format=wx.LIST_FORMAT_LEFT)
self.AppendColumn('M3U8', width=50, format=wx.LIST_FORMAT_CENTER)
示例8: __set_properties
# 需要导入模块: import wx [as 别名]
# 或者: from wx import LIST_FORMAT_LEFT [as 别名]
def __set_properties(self):
# begin wxGlade: JobSpooler.__set_properties
self.SetTitle("Spooler")
self.list_job_spool.SetToolTip("List and modify the queued operations")
self.list_job_spool.AppendColumn("#", format=wx.LIST_FORMAT_LEFT, width=29)
self.list_job_spool.AppendColumn("Name", format=wx.LIST_FORMAT_LEFT, width=90)
self.list_job_spool.AppendColumn("Status", format=wx.LIST_FORMAT_LEFT, width=73)
self.list_job_spool.AppendColumn("Device", format=wx.LIST_FORMAT_LEFT, width=53)
self.list_job_spool.AppendColumn("Type", format=wx.LIST_FORMAT_LEFT, width=41)
self.list_job_spool.AppendColumn("Speed", format=wx.LIST_FORMAT_LEFT, width=77)
self.list_job_spool.AppendColumn("Settings", format=wx.LIST_FORMAT_LEFT, width=82+70)
self.list_job_spool.AppendColumn("Time Estimate", format=wx.LIST_FORMAT_LEFT, width=123)
# end wxGlade
示例9: __set_properties
# 需要导入模块: import wx [as 别名]
# 或者: from wx import LIST_FORMAT_LEFT [as 别名]
def __set_properties(self):
# begin wxGlade: Keymap.__set_properties
self.SetTitle(_("Keymap Settings"))
self.list_keymap.SetToolTip(_("What keys are bound to which actions?"))
self.list_keymap.AppendColumn(_("Key"), format=wx.LIST_FORMAT_LEFT, width=114)
self.list_keymap.AppendColumn(_("Command"), format=wx.LIST_FORMAT_LEFT, width=348)
self.button_add.SetToolTip(_("Add a new hotkey"))
# end wxGlade
示例10: GetColumnAlignments
# 需要导入模块: import wx [as 别名]
# 或者: from wx import LIST_FORMAT_LEFT [as 别名]
def GetColumnAlignments(self, olv, left, right):
"""
Return the alignments of the given slice of columns
"""
listAlignments = [olv.GetColumn(i).GetAlign() for i in range(left, right+1)]
mapping = {
wx.LIST_FORMAT_LEFT: wx.ALIGN_LEFT,
wx.LIST_FORMAT_RIGHT: wx.ALIGN_RIGHT,
wx.LIST_FORMAT_CENTRE: wx.ALIGN_CENTRE,
}
return [mapping[x] for x in listAlignments]
示例11: GetColumnAlignments
# 需要导入模块: import wx [as 别名]
# 或者: from wx import LIST_FORMAT_LEFT [as 别名]
def GetColumnAlignments(self, lv, left, right):
"""
Return the alignments of the given slice of columns
"""
listAlignments = [lv.GetColumn(i).GetAlign() for i in range(left, right+1)]
mapping = {
wx.LIST_FORMAT_LEFT: wx.ALIGN_LEFT,
wx.LIST_FORMAT_RIGHT: wx.ALIGN_RIGHT,
wx.LIST_FORMAT_CENTRE: wx.ALIGN_CENTRE,
}
return [mapping[x] for x in listAlignments]
#----------------------------------------------------------------------------
示例12: GetAlignment
# 需要导入模块: import wx [as 别名]
# 或者: from wx import LIST_FORMAT_LEFT [as 别名]
def GetAlignment(self):
"""
Return the alignment that this column uses
"""
alignment = {
"l": wx.LIST_FORMAT_LEFT,
"c": wx.LIST_FORMAT_CENTRE,
"r": wx.LIST_FORMAT_RIGHT
}.get(self.align[:1], wx.LIST_FORMAT_LEFT)
return alignment
示例13: __set_properties
# 需要导入模块: import wx [as 别名]
# 或者: from wx import LIST_FORMAT_LEFT [as 别名]
def __set_properties(self):
# begin wxGlade: All_Widgets_Frame.__set_properties
self.SetTitle(_("All Widgets"))
_icon = wx.NullIcon
_icon.CopyFromBitmap(wx.ArtProvider.GetBitmap(wx.ART_TIP, wx.ART_OTHER, (32, 32)))
self.SetIcon(_icon)
self.All_Widgets_statusbar.SetStatusWidths([-1])
# statusbar fields
All_Widgets_statusbar_fields = [_("All Widgets statusbar")]
for i in range(len(All_Widgets_statusbar_fields)):
self.All_Widgets_statusbar.SetStatusText(All_Widgets_statusbar_fields[i], i)
self.All_Widgets_toolbar.Realize()
self.bitmap_button_icon1.SetSize(self.bitmap_button_icon1.GetBestSize())
self.bitmap_button_icon1.SetDefault()
self.bitmap_button_empty1.SetSize(self.bitmap_button_empty1.GetBestSize())
self.bitmap_button_empty1.SetDefault()
self.bitmap_button_art.SetSize(self.bitmap_button_art.GetBestSize())
self.bitmap_button_art.SetDefault()
self.checkbox_2.SetValue(1)
self.checkbox_4.Set3StateValue(wx.CHK_UNCHECKED)
self.checkbox_5.Set3StateValue(wx.CHK_CHECKED)
self.checkbox_6.Set3StateValue(wx.CHK_UNDETERMINED)
self.check_list_box_1.SetSelection(2)
self.choice_filled.SetSelection(1)
self.combo_box_filled.SetSelection(0)
self.grid_1.CreateGrid(10, 3)
self.list_box_filled.SetSelection(1)
self.list_ctrl_1.InsertColumn(0, _("A"), format=wx.LIST_FORMAT_LEFT, width=-1)
self.list_ctrl_1.InsertColumn(1, _("B"), format=wx.LIST_FORMAT_LEFT, width=-1)
self.list_ctrl_1.InsertColumn(2, _("C"), format=wx.LIST_FORMAT_LEFT, width=-1)
self.radio_box_filled1.SetSelection(1)
self.radio_box_filled2.SetSelection(1)
self.splitter_1.SetMinimumPaneSize(20)
self.notebook_1_wxSplitterWindow_horizontal.SetScrollRate(10, 10)
self.splitter_2.SetMinimumPaneSize(20)
self.notebook_1_wxSplitterWindow_vertical.SetScrollRate(10, 10)
self.label_1.SetForegroundColour(wx.Colour(255, 0, 0))
self.label_4.SetBackgroundColour(wx.Colour(255, 0, 0))
self.label_4.SetToolTipString(_("Background colour won't show, check documentation for more details"))
self.label_5.SetBackgroundColour(wx.Colour(255, 0, 255))
self.label_5.SetForegroundColour(wx.Colour(0, 255, 0))
self.label_5.SetToolTipString(_("Background colour won't show, check documentation for more details"))
# end wxGlade