當前位置: 首頁>>代碼示例>>Python>>正文


Python wx.LIST_FORMAT_LEFT屬性代碼示例

本文整理匯總了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 
開發者ID:wxGlade,項目名稱:wxGlade,代碼行數:24,代碼來源:ListCtrl_Report_Classic.py

示例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 
開發者ID:wxGlade,項目名稱:wxGlade,代碼行數:24,代碼來源:ListCtrl_Report_Phoenix.py

示例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 
開發者ID:meerk40t,項目名稱:meerk40t,代碼行數:22,代碼來源:DeviceManager.py

示例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) 
開發者ID:andreas-p,項目名稱:admin4,代碼行數:5,代碼來源:ctl_adm.py

示例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); 
開發者ID:andreas-p,項目名稱:admin4,代碼行數:13,代碼來源:ctl_adm.py

示例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) 
開發者ID:andreas-p,項目名稱:admin4,代碼行數:13,代碼來源:ctl_adm.py

示例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) 
開發者ID:ZSAIm,項目名稱:iqiyi-parser,代碼行數:10,代碼來源:listctrl.py

示例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 
開發者ID:meerk40t,項目名稱:meerk40t,代碼行數:15,代碼來源:JobSpooler.py

示例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 
開發者ID:meerk40t,項目名稱:meerk40t,代碼行數:10,代碼來源:Keymap.py

示例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] 
開發者ID:JackonYang,項目名稱:bookhub,代碼行數:13,代碼來源:OLVPrinter.py

示例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]



#---------------------------------------------------------------------------- 
開發者ID:JackonYang,項目名稱:bookhub,代碼行數:17,代碼來源:ListCtrlPrinter.py

示例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 
開發者ID:JackonYang,項目名稱:bookhub,代碼行數:13,代碼來源:ObjectListView.py

示例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 
開發者ID:wxGlade,項目名稱:wxGlade,代碼行數:46,代碼來源:AllWidgets_28.py


注:本文中的wx.LIST_FORMAT_LEFT屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。