Re: Beginning of lines in text widget

From: Pascal Bouvier (pascal_at_prologianetNOSMAP.univ-mrs.fr)
Date: 11/11/03


Date: Tue, 11 Nov 2003 20:46:18 +0100

Pascal Bouvier a écrit :
>
[about an Home key to jump to beginning of visual line instead of real line of text]

> set L [.t dlineinfo insert]
> .t mark set insert @[lindex $L 0],[expr [lindex $L 1]+[lindex $L 4]]
>
> should do the trick.

A "working" stuff:

proc u {W} {
    set l [$W dlineinfo insert]
    $W mark set insert @[lindex $l 0],[expr [lindex $l 1]+[lindex $l 4]];# @leftmarg,baseline
}

pack [text .t]
bind .t <Home> "u %W;break"

HTH,

-- 
Pascal


Relevant Pages

  • Re: PWB 2006 lets get slim
    ... yawatina tan reek esk "Beck" ... > You have to do it all in one trick. ... step onto skateboard, then jump then grind. ...
    (uk.games.video.misc)
  • Re: Limit of function
    ... ticbol a écrit: ... you should learn some other trick. ... What would you do for lim ...
    (sci.math)
  • Re: New Trick Idea!
    ... The seats on the ground, either in front or behind, and you jump up ... Peter Holmgren, one of the pioneers of gliding, coasting and seat drag, ... was practicing this trick in 1983. ... and had not yet been successful when he was showing me ...
    (rec.sport.unicycling)
  • Re: Today I... (brag thread)
    ... jump it.:) ... Edit: I also forgot good editing also. ... IT was a new trick and it took me many takes to get it...so if ...
    (rec.sport.unicycling)
  • Re: Brainwaves
    ... A simple darlington will do the trick? ... How do you jump from sensors to a a transistor circuit configuration? ...
    (sci.electronics.design)