Added ttk::style options. Add function skeletons

This commit is contained in:
Sergey Kalinin 2018-05-19 16:53:48 +03:00
parent bb3add93fa
commit 8d07cc3989
3 changed files with 36 additions and 17 deletions

View File

@ -6,7 +6,7 @@
# https://bitbucket.org/svk28/rac-gui
######################################################
set host 1c-vm-srv
set host localhost
set port 1541

View File

@ -18,7 +18,6 @@ proc TreePress {tree} {
set key [lindex [split $id "::"] 0]
Run::$key $tree $host $values
#RunCommand $root "infobase summary list --cluster=$cluster $host"
}
namespace eval Run {} {}
@ -257,9 +256,8 @@ proc Del {} {
Del::$key .frm_tree.tree $host $values
}
namespace eval Del {} {}
proc Del::work_server {tree host values} {
namespace eval Del {} {
proc work_server {tree host values} {
global active_cluster
.frm_work.tree_work delete [ .frm_work.tree_work children {}]
set answer [tk_messageBox -message "Удалить рабочий сервер $values?" \
@ -272,4 +270,26 @@ proc Del::work_server {tree host values} {
no {return}
}
}
}
proc Add {} {
global active_cluster host
set id [.frm_tree.tree selection]
set values [.frm_tree.tree item [.frm_tree.tree selection] -values]
set key [lindex [split $id "::"] 0]
puts "$key, $id , $values"
Add::$key .frm_tree.tree $host $values
}
namespace eval Add {} {
proc server {} {
}
proc work_server {tree host values} {
}
proc infobase {tree host values} {
Add::infobases $tree $host $values
}
proc infobases {tree host values} {
puts "$tree $host $values"
}
}

View File

@ -23,16 +23,15 @@ wm overrideredirect . 0
wm positionfrom . user
set frm_tool [frame .frm_tool]
ttk::style theme use clam
ttk::button $frm_tool.btn_add -command Add -image add_grey_32
ttk::button $frm_tool.btn_del -command Del -image del_grey_32
ttk::button $frm_tool.btn_quit -command Quit -image quit_grey_32
ttk::style theme use clam
# button $frm_tool.btn_add -text + -command Add -image add_color_32 -relief flat
# button $frm_tool.btn_del -text - -command Del -image del_color_32 -relief flat
# button $frm_tool.btn_quit -text Выход -command Quit -image quit_color_32 -relief flat
#
pack $frm_tool.btn_add $frm_tool.btn_del $frm_tool.btn_quit -side top -padx 5 -pady 5