[racket] display problem

From: Stephen Bloch (sbloch at adelphi.edu)
Date: Thu Apr 5 14:28:58 EDT 2012

On Apr 5, 2012, at 1:39 PM, Roelof Wobben wrote:

> Op 5-4-2012 19:28, Danny Yoo schreef:
>> Can you get the position where the cursor should start by
>> taking the image for the left side text, and take its width?
> ...
> I start with this :
> aaaaa|
> now someone press 3 times the left key.
> So I have  aa/aaa
> How can I know where the cursor is now.
> Or can I do  width - 3 times 11 ?

You could do that, but it's not guaranteed to give you the right answer, because not all characters in a font are necessarily the same width.  How about (as Danny suggested) making an image of the left side text, and taking its width?

Stephen Bloch
sbloch at adelphi.edu

Posted on the users mailing list.