- Code: Select all Expand view
- @ 20,20 SAY oCl PROMPT "Some text" PIXEL OF oDLG SIZE 100, 20 FONT oFont
The text is pressed to the left. In this case, I can easily determine the starting position of any character.
For example, the 6th -"t"
- Code: Select all Expand view
- GetTextWidth(NIL, left(oCl:GetText(),5), oFont:hFont)+1
However, if the text in TSAY is centered,
- Code: Select all Expand view
- @ 20,20 SAY oCl PROMPT "Some text" PIXEL OF oDLG SIZE 100, 20 FONT oFont CENTER
then the position of the symbol cannot be calculated in this way.
How can this be done ?