1
0
mirror of https://bitbucket.org/svk28/rac-gui synced 2024-11-11 00:16:53 +00:00
1c_rac-gui/lib/gui.tcl
Sergey Kalinin 749924c009 Добавлен вывод списка кластеров, серверов, баз и т.д
Добавлено отображение параметров кластера: сервера, базы, соединения, блокировки и т.д.
2018-05-17 11:16:14 +03:00

83 lines
3.1 KiB
Tcl

######################################################
# Rac GUI
# Distributed under GNU Public License
# Author: Sergey Kalinin svk@nuk-svk.ru
# Copyright (c) "http://nuk-svk.ru"
# 2018, https://bitbucket.org/svk28/rac-gui
######################################################
if {[info exists topLevelGeometry]} {
wm geometry . $topLevelGeometry
} else {
wm geometry . 1024x768+0+0
}
wm title . "1C Rac GUI"
wm iconname . "1C Rac Gui"
#image create photo icon -data {}
#wm iconphoto . icon
wm protocol . WM_DELETE_WINDOW Quit
wm overrideredirect . 0
wm positionfrom . user
set frm_tree [frame .frm_tree]
ttk::scrollbar $frm_tree.hsb1 -orient horizontal -command [list $frm_tree.tree xview]
ttk::scrollbar $frm_tree.vsb1 -orient vertical -command [list $frm_tree.tree yview]
set tree [ttk::treeview $frm_tree.tree -xscrollcommand [list $frm_tree.hsb1 set] -yscrollcommand [list $frm_tree.vsb1 set]]
grid $tree -row 0 -column 0 -sticky nsew
grid $frm_tree.vsb1 -row 0 -column 1 -sticky nsew
grid $frm_tree.hsb1 -row 1 -column 0 -sticky nsew
grid columnconfigure $frm_tree 0 -weight 1
grid rowconfigure $frm_tree 0 -weight 1
#bind $frm_tree.tree <ButtonRelease> "TreePress %x %y %X %Y $frm_tree.tree"
bind $frm_tree.tree <ButtonRelease> "TreePress $frm_tree.tree"
#$tree insert {} end -id Languages -text "Languages"
#$tree insert Languages end -text C -values [list "Dennis Ritchie" "1990"]
#$tree insert "" end -id Direct -text "Direct"
#$tree insert Direct end -text C -values [list "Dennis Ritchie" "1990"]
set frm_work [frame .frm_work]
ttk::scrollbar $frm_work.hsb -orient horizontal -command [list $frm_work.tree_work xview]
ttk::scrollbar $frm_work.vsb -orient vertical -command [list $frm_work.tree_work yview]
set tree_work [ttk::treeview $frm_work.tree_work -show headings -columns "par val" -displaycolumns "par val" -xscrollcommand [list $frm_work.hsb set] -yscrollcommand [list $frm_work.vsb set]]
#set tree_work [ttk::treeview $frm_work.tree_work \
#$tree_work heading Creator -text "Creator" -anchor center
#$tree_work heading Year -text "Year" -anchor center
grid $tree_work -row 0 -column 0 -sticky nsew
grid $frm_work.vsb -row 0 -column 1 -sticky nsew
grid $frm_work.hsb -row 1 -column 0 -sticky nsew
grid columnconfigure $frm_work 0 -weight 1
grid rowconfigure $frm_work 0 -weight 1
#pack $tree_work -expand true -fill both
#pack $frm_tree -side left -expand true -fill both
pack $frm_tree $frm_work -side left -expand true -fill both
# $tree_work insert {} end -id Languages -text "Languages"
# $tree_work insert Languages end -text C -values [list "Dennis Ritchie" "1990"]
# $tree_work insert "" end -id Direct -text "Direct"
# $tree_work insert Direct end -text C -values [list "Dennis Ritchie" "1990"]
#
# #toplevel .
# text .t.txt -wrap none -xscroll {.t.h set} -yscroll {.t.v set}
# scrollbar .t.v -orient vertical -command {.t.txt yview}
# scrollbar .t.h -orient horizontal -command {.t.txt xview}
#
# # Lay them out
# grid .t.txt .t.v -sticky nsew
# grid .t.h -sticky nsew
#
# # Tell the text widget to take all the extra room
# grid rowconfigure .t .t.txt -weight 1
# grid columnconfigure .t .t.txt -weight 1