Python wx.LIST_FORMAT_LEFT Examples

The following are 14 code examples of wx.LIST_FORMAT_LEFT(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module wx , or try the search function .
Example #1
Source File: ListCtrl_Report_Classic.py    From wxGlade with MIT License 6 votes vote down vote up
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 
Example #2
Source File: ListCtrl_Report_Phoenix.py    From wxGlade with MIT License 6 votes vote down vote up
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 
Example #3
Source File: DeviceManager.py    From meerk40t with MIT License 6 votes vote down vote up
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 
Example #4
Source File: ctl_adm.py    From admin4 with Apache License 2.0 5 votes vote down vote up
def AddColumnInfo(self, text, size=-1, colname=None, format=wx.LIST_FORMAT_LEFT, proc=None):
    self.AddColumn(text, size, format)
    self.AddExtractorInfo(colname, proc) 
Example #5
Source File: ctl_adm.py    From admin4 with Apache License 2.0 5 votes vote down vote up
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); 
Example #6
Source File: ctl_adm.py    From admin4 with Apache License 2.0 5 votes vote down vote up
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) 
Example #7
Source File: listctrl.py    From iqiyi-parser with MIT License 5 votes vote down vote up
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) 
Example #8
Source File: listctrl.py    From iqiyi-parser with MIT License 5 votes vote down vote up
def initColumn(self):
        self.AppendColumn('N', format=wx.LIST_FORMAT_RIGHT, width=50)
        self.AppendColumn('链接', format=wx.LIST_FORMAT_CENTER, width=40)
        self.AppendColumn('内容', format=wx.LIST_FORMAT_CENTER, width=40)
        self.AppendColumn('类型', format=wx.LIST_FORMAT_CENTER, width=40)
        # self.AppendColumn('音频', format=wx.LIST_FORMAT_CENTER, width=40)
        self.AppendColumn('预览', width=260, format=wx.LIST_FORMAT_LEFT)
        # 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) 
Example #9
Source File: JobSpooler.py    From meerk40t with MIT License 5 votes vote down vote up
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 
Example #10
Source File: Keymap.py    From meerk40t with MIT License 5 votes vote down vote up
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 
Example #11
Source File: OLVPrinter.py    From bookhub with MIT License 5 votes vote down vote up
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] 
Example #12
Source File: ListCtrlPrinter.py    From bookhub with MIT License 5 votes vote down vote up
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]



#---------------------------------------------------------------------------- 
Example #13
Source File: ObjectListView.py    From bookhub with MIT License 5 votes vote down vote up
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 
Example #14
Source File: AllWidgets_28.py    From wxGlade with MIT License 4 votes vote down vote up
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