ich bin auf der Suche nach einer scrollbaren Listenanordnung für Checkboxen. Dabei bin ich über CheckList in Tix gestolpert. Leider kann ich mit der kurzen Erklärung nicht viel anfangen und das Beispiel ist nicht in Python.
Hier das Beispiel aus der Dokumentation :
Code: Alles auswählen
set c [tixCheckList .c]
$c subwidget hlist add choice1 -itemtype imagetext -text Choice1
$c subwidget hlist add choice2 -itemtype imagetext -text Choice2
$c subwidget hlist add choice3 -itemtype imagetext -text Choice3
$c setstatus choice1 on
$c setstatus choice2 off
$c setstatus choice3 off
pack $c
Code: Alles auswählen
#!/usr/bin/python
import Tix as tx
root = tx.Tk()
listbox = tx.CheckList(root)
listbox.pack()
ch1 = listbox.hlist.add('choise1', text='Choise1', itemtype='imagetext')
ch2 = listbox.hlist.add('choise2', text='Choise2', itemtype='imagetext')
ch3 = listbox.hlist.add('choise3', text='Choise3', itemtype='imagetext')
listbox.hlist.setstatus['choise1'] = 'on' # das funktioniert nicht
root.mainloop()
Mawilo