Version 4 of BWidget::PagesManager

Updated 2007-03-09 07:41:49 by jdc

Manual page:

Examples on use of BWidget::PagesManager:

Jos Decoster This is an example using this Bwidget widget to create a wizard framework:

 package require BWidget 

 set pm [PagesManager .pm]
 pack .pm -fill both -expand true

 set npages 5
 for { set i 0 } { $i < $npages } { incr i } {
     set p [$pm add $i]
     grid [label $p.lbl -text "This is page $i"] -row 0 -column 0 -columnspan 2
     grid [button $p.prev -text "Back" -command [list $pm raise [expr {$i-1}]]] -row 1 -column 0
     grid [button $p.next -text "Next" -command [list $pm raise [expr {$i+1}]]] -row 1 -column 1
     if { $i == 0 } { $p.prev configure -state disabled }
     if { $i >= ($npages-1) } { $p.next configure -state disabled }
 }
 $pm raise 0

Category Example