Ignore:
Timestamp:
Oct 12, 2010 4:40:02 PM (11 years ago)
Author:
chlake
Message:

Added Mouse Scroll Wheel Focus

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/sandbox/gsascmds.tcl

    r1021 r1024  
    23502350    $box.can create window 0 0 -anchor nw  -window [frame $box.can.f -bd 2]
    23512351    $box.side create window 0 0 -anchor nw  -window [frame $box.side.f -bd 2]
    2352 
    23532352    grid columnconfig $box 1 -weight 1
    23542353    grid rowconfig $box 1 -weight 1
     
    23832382        grid $box.yscroll -sticky ns -column 2 -row 1
    23842383    } else {
    2385         grid forget $box.yscroll 
     2384        grid forget $box.yscroll
    23862385    }
    23872386    if {[lindex $sizes 2] > [winfo width $box.can]} {
    23882387        grid $box.scroll -sticky ew -column 1 -row 2
    23892388    } else {
    2390         grid forget $box.scroll
    2391     }
    2392 }
     2389        grid forget $box.scroll
     2390    }
     2391}
     2392
     2393proc MouseWheelScrollTable {box} {
     2394     # causes mouse wheel to operate scroll for main canvas in ScrollTable
     2395     # mousewheel can be operated anywhere in parent window
     2396    bind [winfo toplevel $box] <MouseWheel> "$box.can yview scroll \[expr {-abs(%D)/%D}\] unit"
     2397}
     2398
    23932399
    23942400# this is used in cifselect -- not sure why anymore
Note: See TracChangeset for help on using the changeset viewer.