Christopher Lemmer Webber writes:

> Matthew Flatt writes:
>> At Wed, 10 Jan 2018 10:29:28 -0600, Christopher Lemmer Webber wrote:
>>> I'm still not sure how to find out what the "total" height of the text
>>> is in an editor.  Does anyone know how to look that up?
>> I think the `get-extent` method will report the size you want.
> Thank you so much!  That plus the vertical-inset info gave me what I
> needed:
> (let ((h-box (box 0)))
>   (send test-text2 get-extent #f h-box)
>   (send test-ec min-height (+ (inexact->exact (unbox h-box))
>                               (* (send test-ec vertical-inset) 2)))
>   (send test-ec stretchable-height #f))

Horray, this works!  I'm now able to display content and it's nicely
line-wrapped, etc.

Only one problem: Now I have a ton of "editors" which were probably
never meant to be used like this for hundreds of little "microblogs". ;)
The main issue is that scrolling with all these editor canvases in place
is super slow and really chews up CPU.  (When I'm not scrolling, it
seems fine.)

I wonder if there are any obvious hacks I could perform?  Caching things
(is it possible to grab a bitmap of the current text editor's display
content?), replacing the canvases with blank content when not being
looked at, etc?

You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
For more options, visit

Reply via email to