tcl-awthemes 簡介:
awdark and awlight themes for Tk, loosely based on the adwaita themes. Scalable themes: awdark, awlight, black, winxpblue, breeze, arc, clearlooks.
我發現有些 Linux Distribution 有包這個 套件,所以寫了 tcl-awthemes-spec 用來打包成 RPM 檔案並且在 openSUSE 使用。
tcl-awthemes 簡介:
awdark and awlight themes for Tk, loosely based on the adwaita themes. Scalable themes: awdark, awlight, black, winxpblue, breeze, arc, clearlooks.
我發現有些 Linux Distribution 有包這個 套件,所以寫了 tcl-awthemes-spec 用來打包成 RPM 檔案並且在 openSUSE 使用。
package require registry
label .show -text "Below is the list:"
grid .show -row 0 -column 0 -columnspan 2 -pady 3 -ipady 1
set count 0
set rootKey "HKEY_CURRENT_USER\\Software\\Microsoft\\VCExpress\\9.0\\ProjectMRUList"
foreach id [registry values $rootKey] {
if {[string length $id] >= 4} {
set text [registry get $rootKey $id]
ttk::checkbutton .$count -text $text -variable check($id)
grid .$count -column 0 -columnspan 4 -ipady 1 -sticky nsew
set check($id) 0
incr count 1
}
}
proc doClean {} {
foreach id [registry values $::rootKey] {
if {[string length $id] >= 4} {
if {$::check($id) == 1} {
registry delete $::rootKey $id
}
}
}
exit
}
# Let our button in next row
incr count 1
button .exit -text "Exit" -command exit
grid .exit -column 2 -row $count -pady 3 -ipady 1 -sticky nsew
button .clean -text "Clean" -command doClean
grid .clean -column 3 -row $count -pady 3 -ipady 1 -sticky nsew
使用 checkbutton 建立列表,讓使用者選擇要清除最近使用的專案列表中的哪一個。我們使用一個陣列記住目前使用者的選擇,如果使用者按 Clean,就去清掉使用者所選擇的那些項目。