请教:python 中 滚动列表的问题
我想在滚动列表中,当单击或双击列表框中的记录时能调用 Out() 。
我用以下代码可以正确显示滚动列表框,但不能调用 Out() 。
请帮我看一下以下代码哪里有问题。
def Out():
print 'the Out()'
def SelectData( SelectDB ): # 查询数据
print 'SelectData()'
SLBox = Pmw.ScrolledListBox( SelectDB, listbox_selectmode = SINGLE, items = ( 'one','two' ),
labelpos = NW, label_text = '数据'.decode( 'mbcs' ), listbox_height = 5, vscrollmode = 'static',
selectioncommand = Out, dblclickcommand = Out,
usehullsize = 1, hull_width = 200, hull_height = 200 ) # 滚动列表
SLBox.pack( fill = BOTH, expand = 1, padx = 5, pady = 5 )