[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: drawing a string...
- To: bhdamon@COLBY.EDU (Ben Damon), email@example.com
- Subject: Re: drawing a string...
- From: firstname.lastname@example.org (Bill St. Clair)
- Date: Wed, 29 Jun 1994 14:54:15 -0500
At 11:12 AM 6/29/94 -0400, Ben Damon wrote:
> Can someone point me in the direction of a function (or several)
>that well let me draw a string starting at at any point within a
>view/subview? The closest thing I've found is redraw-cell which does pass a
>point as a parameter, but the point asked for is the cell positon within
>the table, not the local pixel adress of the cell.
> I have a one-dimentional table with a scroll-bar. What I'm
>ultimatly trying to do is click and drag one cell to annother location
>within the same table. My problem is that during the drag I want to see the
>text of the cell being dragged also, not just a grey rectagle that
>represents the cell....
> Ben Damon
To position the cursor, use the #_MoveTo trap. To draw the string,
use #_DrawChar, #_DrawString, or just do Lisp output to the view
with FORMAT, PRIN1, etc. If you use #_DrawString, remember to convert
a lisp string to a Pascal string using WITH-PSTRS, and remember that
Pascal strings are limited to 255 characters in length. Also, #_DrawString
doesn't do anything for newline characters, and lisp output will
interpret a newline to mean "move to the left edge of the view".