Hi all,
I’m developing a C/CPP editor which will support bookmarks and other
but I’ve problem to obtain resourcess for lines in a PtMultiText control.
In the PtMultiText help there is small description that show how to obtain
lines positions and sizes :

Use the Pt_ARG_MULTITEXT_QUERY_LINE resource to query the first line (line
1). This gives you information in the form of a PtMultiTextQuery_t
structure, which contains a pointer to a PtMultiTextLine_t structure. The
PtMultiTextLine_t structure contains a PhRect_t structure that specifies the
extent for that line. Calculate the dimensions of the line as:

height = - extent.ul.y + 1;
width = - extent.ul.x + 1;
The lines are organized as a linked list, using the next and previous
pointers in the PtMultiTextLine_t structure. Traverse all the lines until
the next pointer is NULL, calculating:

a… the sum of the heights
b… the maximum width
When you’ve examined all the lines, you’ll have the “virtual dimensions” of
the text input area (i.e. the area that the text would occupy if it had
enough room to do so)

If you have only one font in the PtMultiText widget, the method of finding
the dimensions can be simplified. For example, to find the virtual height,
calculate the height of the first line and multiply it by the number of


I’ve sucessfuly obtain most (maybe all) of the information in this
structure, but the information for and extent.ul.y have strange
values (like “-12”…). The and extent.ul.x values seems to be
I’ve used Phab and non-Phab application and the result is the same. Also
I’ve tryed to change most of the resourcess on PtMultiText control in Phab,
but these parameters is still wrong. Is there any flag that I have to set to
obtain this information? Or this is just a bug on PtMultiText? I’ve also
used PtMultiTextInfo() function to obtain this information, but … no
success at all :frowning:

Can any one help me?

Best Regards :
Filip Dimitrov