config.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:cebl 作者: idfah 项目源码 文件源码
def initChannelConfig(self):
        """Initialize the channel configuration area.
        """
        # controlbox to surround the area
        chanControlBox = widgets.ControlBox(self.scrolledPanel,
                label='Channels', orient=wx.HORIZONTAL)

        # only supports two columns, this could probably be done better XXX - idfah
        ## # left column
        ## leftChanSizer = wx.BoxSizer(orient=wx.VERTICAL)

        ## # create text controls
        ## self.chanTextCtrls = []
        ## for c in xrange(16):
        ##     curChanTextCtrl = wx.TextCtrl(self.scrolledPanel)
        ##     self.chanTextCtrls.append(curChanTextCtrl)
        ##     leftChanSizer.Add(curChanTextCtrl, proportion=0,
        ##         flag=wx.RIGHT | wx.TOP | wx.LEFT, border=10)

        ## # add to sizer
        ## chanControlBox.Add(leftChanSizer)

        ## # right column
        ## rightChanSizer = wx.BoxSizer(orient=wx.VERTICAL)

        ## # create text controls
        ## for c in xrange(16):
        ##     curChanTextCtrl = wx.TextCtrl(self.scrolledPanel)
        ##     self.chanTextCtrls.append(curChanTextCtrl)
        ##     rightChanSizer.Add(curChanTextCtrl, proportion=0,
        ##         flag=wx.RIGHT | wx.TOP | wx.LEFT, border=10)

        ## # add to sizer
        ## chanControlBox.Add(rightChanSizer)

        self.chanSizer = wx.GridSizer(40, 2, 10, 10)
        #self.chanSizer = wx.BoxSizer(orient=wx.VERTICAL)

        self.chanTextCtrls = [wx.TextCtrl(self.scrolledPanel) for i in xrange(40*2)]
        self.chanSizer.AddMany(self.chanTextCtrls)
        #for ctc in self.chanTextCtrls:
        #    self.chanSizer.Add(ctc, proportion=0, flag=wx.TOP | wx.LEFT | wx.RIGHT, border=2)

        chanControlBox.Add(self.chanSizer, flag=wx.ALL, border=10)

        # sizer for channel configuration area
        self.chanSizer = wx.BoxSizer(orient=wx.VERTICAL)
        self.chanSizer.Add(chanControlBox, proportion=1,
                           flag=wx.TOP | wx.BOTTOM, border=10)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号