alright I've come up with a pretty reasonable solution and I'll post it in case anyone needs a size grip for a widget. here's the complete example. Now I only have one problem: the cursor changes back to left_ptr when dragging it
set pressed 0
# testing canvas + scrollbars
tk::canvas .c -scrollregion "0 0 1000 1000" -yscrollcommand ".v set" -xscrollcommand ".h set" -bg blue -highlightthickness 0
ttk::scrollbar .h -orient horizontal -command ".c xview"
ttk::scrollbar .v -orient vertical -command ".c yview"
grid .c -sticky nwes -column 0 -row 0
grid .h -row 1 -column 0 -sticky ew
grid .v -row 0 -column 1 -sticky ns
grid columnconfigure . 0 -weight 1
grid rowconfigure . 0 -weight 1
#create frame and window for "mega" widget
ttk::frame .c.test -width 200 -height 200
.c create window 50 50 -anchor nw -window .c.test
#create ruler, velocity, and keyboard canvases
tk::canvas .c.test.rule -scrollregion "0 0 500 50" -highlightthickness 0 -bg red -height 50
tk::canvas .c.test.kb -scrollregion "0 0 50 500" -highlightthickness 0 -bg green -width 50
#tk::canvas .c.test.vel -scrollregion "0 0 5000 50" -highlightthickness 0 -bg purple -height 50
#create buttons
ttk::frame .c.test.buttons -width 50 -height 50
ttk::button .c.test.buttons.editmode -text edt -width 6 -command editmode
ttk::button .c.test.buttons.selectmode -text select -width 6 -command selmode
#create canvas, sizegrip, and scrollbars for editing region (inframe)
ttk::frame .c.test.inframe
#grid propagate .c.test.inframe 0
grid propagate .c.test 0
ttk::scrollbar .c.test.inframe.h -orient horizontal -command ".c.test.inframe.canvas xview"
ttk::scrollbar .c.test.inframe.v -orient vertical -command ".c.test.inframe.canvas yview"
tk::canvas .c.test.inframe.canvas -scrollregion "0 0 500 500" -xscrollcommand ".c.test.inframe.h set" -yscrollcommand ".c.test.inframe.v set" -highlightthickness 0 -bg yellow
# blank frames for offsetting scrollbars with grid, later maybe have these be zoom controls
ttk::frame .c.test.blankh -width [.c.test.inframe.v cget -width] -height 50
ttk::frame .c.test.blankv -height [.c.test.inframe.h cget -width] -width 50
tk::canvas .
c.test.inframe.sz -scrollregion "0 0 [.c.test.inframe.h cget -width] [.c.test.inframe.v cget -width]" -highlightthickness 0 -bg purple -width [.c.test.inframe.h cget -width] -height [.c.test.inframe.v cget -width] -cursor bottom_right_corner
# grid everything todo: change sizegrip line to scale right
.
c.test.inframe.sz create line 2 10 10 2 -fill white
grid .c.test.rule -column 1 -row 0 -sticky we
grid .c.test.kb -column 0 -row 1 -sticky ns
#grid .c.test.vel -column 1 -row 2 -sticky w
grid .c.test.buttons -column 0 -row 0 -sticky nsew
grid .c.test.buttons.editmode -column 0 -row 0 -sticky nsew
grid .c.test.buttons.selectmode -column 0 -row 1 -sticky nsew
grid propagate .c.test.buttons 0
grid columnconfigure .c.test.buttons 0 -weight 1
grid rowconfigure .c.test.buttons 0 -weight 0
grid rowconfigure .c.test.buttons 1 -weight 0
grid .c.test.blankh -column 2 -row 0 -sticky ne
grid .c.test.blankv -column 0 -row 2 -sticky sw
# inframe stuff
grid .c.test.inframe -column 1 -row 1 -sticky nwes -columnspan 2 -rowspan 2
grid .c.test.inframe.canvas -column 0 -row 0 -sticky nwes
grid rowconfigure .c.test.inframe 0 -weight 1
grid columnconfigure .c.test.inframe 0 -weight 1
grid .c.test.inframe.v -column 1 -row 0 -sticky ns
grid .c.test.inframe.h -column 0 -row 1 -sticky ew
grid .
c.test.inframe.sz -column 1 -row 1 -sticky se
grid rowconfigure .c.test 1 -weight 1
grid rowconfigure .c.test 0 -weight 0
grid columnconfigure .c.test 1 -weight 1
grid columnconfigure .c.test 0 -weight 0
proc selmode {} {
.c.test.inframe.canvas configure -cursor hand1
}
selmode
proc destroyall {} {
foreach w [winfo children .] {
destroy $w
}
}
proc editmode {} {
.c.test.inframe.canvas configure -cursor pencil
}
bind .
c.test.inframe.sz <ButtonPress-1> {
global prespos
set prespos [list [expr [.c.test cget -width] - %X] [expr [.c.test cget -height] - %Y]]
puts "pressed"
grab set .
c.test.inframe.sz
}
bind .
c.test.inframe.sz <B1-Motion> {
global prespos
.c.test configure -width [expr %X + [lindex $prespos 0]] -height [expr %Y + [lindex $prespos 1]]
}
bind .
c.test.inframe.sz <Leave> {
puts "left"
}
bind .
c.test.inframe.sz <Enter> {
puts "entered"
}
bind .
c.test.inframe.sz <ButtonRelease-1> {
grab release .
c.test.inframe.sz
}