Tk Text Edit

Check-in [c02a06dc34]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fixed resizeing bugs
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | trunk
Files: files | file ages | folders
SHA1:c02a06dc34b732fdc47f146a2395ea7046deacc0
User & Date: dennis2 2002-12-17 09:45:22
Context
2002-12-17
09:45
Fixed resizeing bugs Leaf check-in: c02a06dc34 user: dennis2 tags: trunk
09:44
Fixed bug with remote loading of http check-in: 6d4090ffa0 user: dennis2 tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to lib/gui.tcl.

424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442



443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471


#------------------------ Window resizing ------------------------------------
set zpos ""
set wpos ""

bind all  <ButtonRelease> {
global zpos
set zpos ""
}

bind .status.c <Button> {
global zpos wpos
set zpos "%X %Y"
set wpos [split [winfo geometry .] "+x"]
}

bind .status.c <Motion> {
global zpos wpos



if {$zpos!=""} {
	set diffx [expr %X - [lindex $zpos 0] ]
	set diffy [expr %Y - [lindex $zpos 1] ]

	set w [expr [lindex $wpos 0] + $diffx] 
	set h [expr [lindex $wpos 1] + $diffy]
				
	if {$w<0} { set w [lindex $wpos 0] }
	if {$h<0} { set h [lindex $wpos 1] }
	set s "x"

	if {$tcl_platform(platform)!="windows"} {
	# For X11 we need to compensate for menubar
	set menuh [winfo height .#menu]	
	wm geometry . "=$w$s$h+[winfo x .]+[expr [winfo y .] - $menuh ]"
	} else {
	wm geometry . "=$w$s$h"
	}

	}
}


#----------------------------------------------------------------

grid  .wl  -row 0 -column 0 -sticky ew -columnspan 5      
grid .text -column 0 -row 1 -sticky nsew -rowspan 2 -columnspan 3
grid .scrolly -column 3 -row 1 -sticky ns -rowspan 2
grid .scrollx -column 0 -row 3 -sticky ew -columnspan 2







|
|



|
|
|



|
>
>
>
|
|
|

|
|

|
|
|

<
<
<
<
<
|
|
|
|
<
<







424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456





457
458
459
460


461
462
463
464
465
466
467


#------------------------ Window resizing ------------------------------------
set zpos ""
set wpos ""

bind all  <ButtonRelease> {
	global zpos
	set zpos ""
}

bind .status.c <Button> {
	global zpos wpos
	set zpos "%X %Y"
	set wpos [split [winfo geometry .] "+x"]
}

bind .status.c <Motion> {
	global zpos wpos


	if {[info exists zpos]} {
		if {$zpos!=""} {
			set diffx [expr %X - [lindex $zpos 0] ]
			set diffy [expr %Y - [lindex $zpos 1] ]

			set w [expr [lindex $wpos 0] + $diffx] 
			set h [expr [lindex $wpos 1] + $diffy]
				
			if {$w<0} { set w [lindex $wpos 0] }
			if {$h<0} { set h [lindex $wpos 1] }
			set s "x"






			wm geometry . "=$w$s$h"
		}
	}
}



#----------------------------------------------------------------

grid  .wl  -row 0 -column 0 -sticky ew -columnspan 5      
grid .text -column 0 -row 1 -sticky nsew -rowspan 2 -columnspan 3
grid .scrolly -column 3 -row 1 -sticky ns -rowspan 2
grid .scrollx -column 0 -row 3 -sticky ew -columnspan 2