Ignore:
Timestamp:
Nov 10, 2016, 12:56:04 PM (10 years ago)
Author:
Pedro Gea <pgea@…>
Branches:
1941-docker-image-to-test, devel, master
Children:
a762e01
Parents:
0731938
Message:

Refs #1933
Se sustituyen los ::blt::tabset por NoteBook de BWidget. En total se sustituyeron 19 tabsets.
Se suspenden un par de widgets que parece que no se usan, y por tanto tampoco se les ha sustituido ::blt::tabset: bsersel, btab. bchilddetail tampoco parece usarse.
Se corrige un problem en InsertItem de tolinspe.

git-svn-id: ​https://www.tol-project.org/svn/tolp/trunk@7337 be4846ae-f051-483a-831f-b64e7d08527f

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tolbase/lib/toltk/bysgropt.tcl

    r0731938 re933fd6  
    698698  set w [$dialog getframe]
    699699  wm resizable $dialog 0 0
    700   set w_tabset [::blt::tabset $w.ts -relief flat -highlightthickness 0\
    701                         -bd 0 -outerpad 0 -tier 2 -slant both -textside right\
    702                 -side left -rotate 90 ]
    703  
    704   #insertar tabset
    705   $w_tabset insert end General
    706   set f0 [frame $w_tabset.f0]
    707   $w_tabset tab configure "General" -text [mc "General"]\
    708            -window $f0 -fill both -padx 0 -selectbackground \#d9d9d9 -bg gray75
     700  #@ Se ubican las pestañas abajo, ya que NoteBook no las admite a la izquierda
     701  set w_tabset [NoteBook $w.nb -tabbevelsize 8 -tabpady {2 6} -font {Arial 8} -side bottom]
     702 
     703  #insertar tabset
     704  set num_i 0
     705  set lab_i General
     706  $w_tabset insert $num_i $lab_i -text "  [mc $lab_i]  " -background \#d9d9d9
     707  set tab_i [$w_tabset getframe $lab_i]
     708  $tab_i configure -borderwidth 2 -background \#d9d9d9 
     709  set f$num_i [frame $tab_i.f]
     710  pack $tab_i.f -fill both -expand yes   
     711
    709712  #Crear opciones generales
    710713  eval GrapOptCreate $this $f0 [array get opts]
    … …  
    713716    $data(proc,OnOptionCreate) $this $w_tabset
    714717  }
     718  $w_tabset raise [$w_tabset pages 0] 
    715719   
    716720  set w_bbox \
    … …  
    734738 
    735739  pack $w_bbox -fill x -expand false -side bottom
     740  $w_tabset compute_size
    736741  pack $w_tabset -fill both -expand true
    737742  bind $dialog <F1> "ShowHelp Tb4GraOpc"
    … …  
    777782  ]
    778783  array set opts $args
    779 
    780   set widgets(general,w_tabset) [::blt::tabset $frame.ts -relief flat \
    781     -highlightthickness 0 -bd 0 -outerpad 0 -tier 2 -slant right \
    782     -textside right]
    783   #puts "GrapOptCreate. $widgets(general,w_tabset)" 
    784   $widgets(general,w_tabset) insert end Axis Lines Grid Legend Style
    785 
    786   set f1  [frame $widgets(general,w_tabset).f1]
    787   set f2  [frame $widgets(general,w_tabset).f2]
    788   set f3  [frame $widgets(general,w_tabset).f3]
    789   set f4  [frame $widgets(general,w_tabset).f4]
    790   set f5  [frame $widgets(general,w_tabset).f5]
    791  
    792   $widgets(general,w_tabset) tab configure "Axis" -text "[mc "Axis"]" \
    793     -window $f1 -fill both -padx 0 -selectbackground \#d9d9d9 -bg gray75
    794   $widgets(general,w_tabset) tab configure "Lines" -text [mc "Lines"] \
    795     -window $f2 -fill both -padx 0 -selectbackground \#d9d9d9 -bg gray75
    796   $widgets(general,w_tabset) tab configure "Grid" -text [mc "Grid"] \
    797     -window $f3 -fill both -padx 0 -selectbackground \#d9d9d9 -bg gray75
    798   $widgets(general,w_tabset) tab configure "Legend" -text [mc "Legend"] \
    799     -window $f4 -fill both -padx 0 -selectbackground \#d9d9d9 -bg gray75
    800   $widgets(general,w_tabset) tab configure "Style" -text [mc "Style"] \
    801     -window $f5 -fill both -padx 0 -selectbackground \#d9d9d9 -bg gray75
     784   
     785  set widgets(general,w_tabset) [NoteBook $frame.nb -tabbevelsize 8 -tabpady {2 6} -font {Arial 8}]
     786  set num_i 0
     787  foreach lab_i [list Axis Lines Grid Legend Style] {
     788    $widgets(general,w_tabset) insert $num_i $lab_i -text "  [mc $lab_i]  " -background \#d9d9d9
     789    set tab_i [$widgets(general,w_tabset) getframe $lab_i]
     790    $tab_i configure -borderwidth 2 -background \#d9d9d9
     791    incr num_i
     792    set f$num_i [frame $tab_i.f]
     793    pack $tab_i.f -fill both -expand yes
     794  }
     795  $widgets(general,w_tabset) raise [$widgets(general,w_tabset) pages 0]
    802796 
    803797  GrapOptGet            $this
    804798  GrapOptCreateAxisXY   $this $f1 $opts(-iniaxis)
    805799  GrapOptCreateLines    $this $f2 $opts(-nline)
    806 
    807800  GrapOptCreateGrid     $this $f3
    808801  GrapOptCreateLegend   $this $f4
    … …  
    815808  # show tabset indicates
    816809  if {[string length $opts(-tabshow)]} {
    817     set ts $widgets(general,w_tabset)
    818     $ts select [$ts index -name $opts(-tabshow)]
     810    $widgets(general,w_tabset) raise $opts(-tabshow)
    819811  } 
    820812
     813  $widgets(general,w_tabset) compute_size
    821814  grid $widgets(general,w_tabset) -sticky news 
    822815  grid rowconfigure    $frame 0 -weight 1
    … …  
    954947  grid columnconfigure $fs 0 -weight 1
    955948
    956   # Tab Set
    957   set w_tabset [::blt::tabset $w.ts -relief flat -highlightthickness 0\
    958                         -bd 0 -outerpad 0 -tier 2 -slant right -textside right]
    959   $w_tabset insert end Scales Title Format Marker
    960 
    961   set f1 [frame $w_tabset.f1]
    962   set f2 [frame $w_tabset.f2]
    963   set f3 [frame $w_tabset.f3]
    964   set f4 [frame $w_tabset.f4]
    965  
    966   $w_tabset tab configure "Scales" -text [mc Scales]  -window $f1 \
    967     -fill both -padx 0 -selectbackground \#d9d9d9 -bg gray75
    968   $w_tabset tab configure "Format" -text [mc Format]  -window $f2 \
    969     -fill both -padx 0 -selectbackground \#d9d9d9 -bg gray75
    970   $w_tabset tab configure "Marker" -text [mc Marker]  -window $f3 \
    971     -fill both -padx 0 -selectbackground \#d9d9d9 -bg gray75
    972   $w_tabset tab configure "Title"  -text [mc Title]   -window $f4 \
    973     -fill both -padx 0 -selectbackground \#d9d9d9 -bg gray75
     949  # Tab Set   
     950  set w_tabset [NoteBook $w.nb -tabbevelsize 8 -tabpady {2 6} -font {Arial 8}]
     951  set num_i 0
     952  foreach lab_i [list Scales Format Marker Title] {
     953    $w_tabset insert $num_i $lab_i -text "  [mc $lab_i]  " -background \#d9d9d9
     954    set tab_i [$w_tabset getframe $lab_i]
     955    $tab_i configure -borderwidth 2 -background \#d9d9d9
     956    incr num_i
     957    set f$num_i [frame $tab_i.f]
     958    pack $tab_i.f -fill both -expand yes 
     959  }
     960  $w_tabset raise [$w_tabset pages 0]
    974961
    975962  # X-Axis
    … …  
    11551142
    11561143  # General
     1144  $w_tabset compute_size
    11571145  grid $w.tfxs  $w_tabset -sticky news -padx 2
    11581146  grid ^        $w.tfsf   -sticky news -padx 2
    … …  
    13531341
    13541342  # OPTIONS LINES AND DATA
    1355   set w_tabset [::blt::tabset $w.ts -relief flat -highlightthickness 0\
    1356     -bd 0 -outerpad 0 -tier 2 -slant right -textside right]
    1357   $w_tabset insert end Line Data
    1358 
    1359   set ts1 [frame $w_tabset.f1]
    1360   set ts2 [frame $w_tabset.f2]
    1361 
    1362   $w_tabset tab configure "Line" -text [mc "Line"] \
    1363     -window $ts1 -fill both -padx 0 -selectbackground \#d9d9d9 -bg gray75
    1364   $w_tabset tab configure "Data" -text [mc "Data"]\
    1365     -window $ts2 -fill both -padx 0 -selectbackground \#d9d9d9 -bg gray75
    1366 
    1367   GrapOptCreateLinesLine $this $ts1
    1368   GrapOptCreateLinesData $this $ts2
     1343  set w_tabset [NoteBook $w.nb -tabbevelsize 8 -tabpady {2 6} -font {Arial 8}]
     1344  set num_i 0
     1345  foreach lab_i [list Line Data] {
     1346    $w_tabset insert $num_i $lab_i -text "  [mc $lab_i]  " -background \#d9d9d9
     1347    set tab_i [$w_tabset getframe $lab_i]
     1348    $tab_i configure -borderwidth 2 -background \#d9d9d9
     1349    incr num_i
     1350    set f$num_i [frame $tab_i.f]
     1351    pack $tab_i.f -fill both -expand yes 
     1352  }
     1353  $w_tabset raise [$w_tabset pages 0]
     1354
     1355  GrapOptCreateLinesLine $this $f1
     1356  GrapOptCreateLinesData $this $f2
    13691357 
    13701358  #GRID
     1359  $w_tabset compute_size
    13711360  grid  $w.tf0 $w_tabset -sticky news -padx 1   
    13721361 
    … …  
    17051694#/////////////////////////////////////////////////////////////////////////////
    17061695  variable tmpOpt
    1707   # tab_set
    1708   set tsmarker [::blt::tabset $w.ts -relief flat -highlightthickness 0\
    1709                         -bd 0 -outerpad 0 -tier 2 -slant right -textside right]
    1710   $tsmarker insert end Marker Style
    1711 
    1712   set f1 [frame $tsmarker.f1]
    1713   set f2 [frame $tsmarker.f2]
    1714 
    1715   $tsmarker tab configure "Marker"   -text [mc Marker]   -window $f1 \
    1716     -fill both -padx 0 -selectbackground \#d9d9d9 -bg gray75
    1717   $tsmarker tab configure "Style" -text [mc Style] -window $f2 \
    1718     -fill both -padx 0 -selectbackground \#d9d9d9 -bg gray75
     1696  # tab_set 
     1697  set tsmarker [NoteBook $w.nb -tabbevelsize 8 -tabpady {2 6} -font {Arial 8}]
     1698   
     1699  set num_i 0
     1700  foreach lab_i [list Marker Style] {
     1701    $tsmarker insert $num_i $lab_i -text "  [mc $lab_i]  " -background \#d9d9d9
     1702    set tab_i [$tsmarker getframe $lab_i]
     1703    $tab_i configure -borderwidth 2 -background \#d9d9d9
     1704    incr num_i
     1705    set f$num_i [frame $tab_i.f]
     1706    pack $tab_i.f -fill both -expand yes 
     1707  }
     1708  $tsmarker raise [$tsmarker pages 0] 
    17191709
    17201710  # Marker
    … …  
    17711761
    17721762  # General
     1763  $tsmarker compute_size
    17731764  grid $tsmarker -sticky news -padx 2
    17741765  grid rowconfigure    $w 0 -weight 1
Note: See TracChangeset for help on using the changeset viewer.