-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathunpackpanel.py
46 lines (36 loc) · 1.56 KB
/
unpackpanel.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import wx
import util
from paklistctrl import PakListCtrl
from paklistctrlicon import PakListCtrlIcon
class UnpackPanel(wx.Panel):
def __init__(self,parent,id,type='ListView'):
wx.Panel.__init__(self,parent,id)
vbox = wx.BoxSizer(wx.VERTICAL)
hbox0 = wx.BoxSizer(wx.HORIZONTAL)
hbox1 = wx.BoxSizer(wx.HORIZONTAL)
#hbox2 = wx.BoxSizer(wx.HORIZONTAL)
self.toolBar1 = wx.Panel(self,-1)
self.backBt = wx.BitmapButton(self.toolBar1,-1,bitmap=wx.Bitmap(util.GetResourcePath('image/backbutton_25.ico')),style=wx.NO_BORDER)
self.addressCb = wx.ComboBox(self.toolBar1,-1,size=(50,-1))
hbox1.Add(self.backBt,0,wx.LEFT | wx.RIGHT | wx.BOTTOM,4)
hbox1.Add(self.addressCb,1,wx.LEFT | wx.BOTTOM,4)
self.toolBar1.SetSizer(hbox1)
vbox.Add(self.toolBar1,0,wx.EXPAND)
if type == 'ListView':
self.pakListCtrl = PakListCtrl(self, -1)
else:
self.pakListCtrl = PakListCtrlIcon(self, -1)
vbox.Add(self.pakListCtrl,1,wx.EXPAND)
self.SetSizer(vbox)
self.Bind(wx.EVT_LIST_ITEM_ACTIVATED, self.OnItemActivated)
self.Bind(wx.EVT_LIST_ITEM_RIGHT_CLICK, self.OnItemRightClick)
self.Bind(wx.EVT_BUTTON,self.OnButtonClicked)
def OnItemActivated(self, evt):
#传递到下一层处理
evt.Skip()
def OnButtonClicked(self,evt):
#传递到下一层处理
evt.Skip()
def OnItemRightClick(self,evt):
# 传递到下一层处理
evt.Skip()