[WASTE-list] monospace text

Chinh Nguyen cnguyen at stata.com
Fri May 11 11:35:33 EDT 2007


My app has a built-in text editor for editing programs and it uses
monospace, monostyle text.

Is there a way to to set the inter character spacing so that each
character is of a non fractional pixel width? I constrain window
resizes to columns (like Terminal.app) and that's no longer working
since the switch from WASTE 2 to WASTE 3. It would also be useful
for tabbing because I tab based on characters and that's now broken too.

In terms of constraining to a line height, that works OK. However,
when I scroll down (I scroll by line height and character width
rather than by pixel since my scrollbars track lines and columns, not
pixels), I always see the bottom 2 pixel rows of the previous line to
the top line of the page. My destrect and viewrect are the same
except the destrect is really wide since I don't use word wrap.

Which also leads me to this. In the WASTE sample, I see that in the
calculation of the text rect, there's an InsetRect() of 3 pixels.
However, when you resize the window, you still see the text drawn up
to the edge of the scrollbars. Why is that? I do that same thing
with my editor and as a test, I commented out the InsetRect() and saw
that the text overwrites the scrollbars by you guessed it, 3 pixels.
It's not that I want a 3 pixel gap next to my scrollbars, I'm just
wondering why it's necessary to subtract 3 pixels from the right and
bottom of the text rect. I think this logic has been there since
older versions of WASTE.

Also, in my Run Log I get the message:

Exception thrown in function void WE3_File::OpenResFile(SInt8)
(WE3_File.cp, line 272); error code = -39

when I WELoad() a text file. I figure it's a harmless message
because the file opens just fine.

-Chinh Nguyen
cnguyen at stata.com



More information about the WASTE-list mailing list