Esempio n. 1
0
    def OnCellLeftClick(self, evt):
        MyFrame.BackButton.Show(True)
        MyFrame.BackButton.Bind(wx.EVT_BUTTON,self.Back5)
        print "(%d, %d)"%(evt.GetRow(), evt.GetCol())
        print self.GetCellValue(evt.GetRow(), evt.GetCol())
        print self.GetCellValue(evt.GetRow(),0)
        for key in MyFrame.ConfIndex:
            if(self.GetCellValue(evt.GetRow(),0)==MyFrame.ConfIndex[key]):
                MyFrame.key=key
                print "key"+key
        MyFrame.getfiledb=confs.getFileDb(MyFrame.key)

        MyGrid1.lens=len(MyFrame.getfiledb)
        self.Show(False)
        self.grid=wx.grid.Grid(frame,-1,pos=(300,100),size=(700,300))
        self.grid.CreateGrid(MyGrid1.lens, 1)
        self.grid.SetColLabelValue(0,"Name")
        self.grid.SetRowLabelSize(50)
        self.grid.SetColSize(0,650)
       
        row=0
        for i in MyFrame.getfiledb:
           
            self.grid.SetCellValue(row,0,MyFrame.getfiledb[i].split("###",2)[0])
            row+=1
           # 当单击鼠标左键时触发
        self.grid.Bind(grid.EVT_GRID_CELL_LEFT_CLICK, self.OnConfDetail)
Esempio n. 2
0
    def __init__(self,parent,conf_home):
        wx.Frame.__init__(self,None,-1,size=(460,320))

        MyFrame.FileDb=confs.getFileDb(conf_home)
        label1=wx.StaticText(self,-1,MyFrame.getfiledb[MyFrame.key2].split("###",2)[0],size=(350,40),pos=(20,20))
        button1=wx.Button(self,-1,"down",size=(80,30),pos=(370,20))
        button1.Bind(wx.EVT_BUTTON,self.Download)
        textctrl=wx.TextCtrl(self,-1,MyFrame.getfiledb[MyFrame.key2].split("###",2)[1],style=wx.TE_MULTILINE,size=(400,200),pos=(20,60))
        self.label2=wx.StaticText(self,-1,"http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber="+MyFrame.key2,size=(300,30),pos=(20,280))
        button2=wx.Button(self,-1,"copy Url",size=(80,30),pos=(370,280))
        button2.Bind(wx.EVT_BUTTON,self.CopyUrl)
        self.Show(True)