| Ticket UUID: | 505465 | |||
| Title: | 2 new commands for PanedWindow | |||
| Type: | RFE | Version: | None | |
| Submitter: | norganos | Created on: | 2002-01-18 17:53:10 | |
| Subsystem: | bwidget | Assigned To: | hobbs | |
| Priority: | 5 Medium | Severity: | ||
| Status: | Closed | Last Modified: | 2007-11-15 10:20:07 | |
| Resolution: | Closed By: | sf-robot | ||
| Closed on: | 2007-11-15 03:20:07 | |||
| Description: |
What about 2 new commands for the PanedWindow to
hide/show a frame?
Here is what I wrote to do this:
proc PanedWindow::show { path num } {
variable _panedw
if { $num < $_panedw($path,nbpanes) } {
}
if [winfo exists [set pane "$path.f$num"]] {
set side [Widget::getoption $path -side]
grid $pane
if { ![string compare $side "top"] || ![string
compare $side "bottom"] } {
grid columnconfigure $path [expr {2*$num}] \
-weight [Widget::getoption $path.f$num -
weight]
} else {
grid rowconfigure $path [expr {2*$num}] \
-weight [Widget::getoption $path.f$num -
weight]
}
if { [expr $num + 1] < $_panedw($path,nbpanes) } {
set sash "$path.sash[expr $num + 1]"
} elseif { $num > 0 } {
set sash "$path.sash$num"
}
if [winfo exists $sash] {
grid $sash
}
}
}
proc PanedWindow::hide { path num } {
variable _panedw
if { $num < $_panedw($path,nbpanes) } {
}
if [winfo exists [set pane "$path.f$num"]] {
set side [Widget::getoption $path -side]
grid remove $pane
if { ![string compare $side "top"] || ![string
compare $side "bottom"] } {
grid columnconfigure $path [expr {2*$num}] \
-weight 0
} else {
grid rowconfigure $path [expr {2*$num}] \
-weight 0
}
if { [expr $num + 1] < $_panedw($path,nbpanes) } {
set sash "$path.sash[expr $num + 1]"
} elseif { $num > 0 } {
set sash "$path.sash$num"
}
if [winfo exists $sash] {
grid remove $sash
}
}
}
| |||
| User Comments: |
sf-robot added on 2007-11-15 10:20:07:
Logged In: YES user_id=1312539 Originator: NO This Tracker item was closed automatically by the system. It was previously set to a Pending status, and the original submitter did not respond within 14 days (the time period specified by the administrator of this Tracker). hobbs added on 2007-11-01 01:56:33: Logged In: YES user_id=72656 Originator: NO I recommend 8.4's panedwindow, enhanced in 8.5 (and also a new ttk::panedwindow) | |||
Home
Blog
Docs
Downloads
Tickets
Timeline
Branches
Tags
Wiki