how can i get rectangle of a character, not a text item

General TRichView support forum. Please post your questions here
Post Reply
amethyst623
Posts: 3
Joined: Wed Sep 28, 2011 2:55 pm

how can i get rectangle of a character, not a text item

Post by amethyst623 »

hi,
how can i get rectangle of a character, not a text item, not a word in TRichViewEdit?

GetItemClientCoords returns coordinates of item.

or how to select a character in a word by code?
Sergey Tkachenko
Site Admin
Posts: 17572
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Positions of characters are not stored. They can be calculated, but it's quite complicated (and the code will be different when RTL support is enabled and disabled).
If you need to select a character, use SetSelectionBounds method.
amethyst623
Posts: 3
Joined: Wed Sep 28, 2011 2:55 pm

Post by amethyst623 »

Sergey Tkachenko wrote:Positions of characters are not stored. They can be calculated, but it's quite complicated (and the code will be different when RTL support is enabled and disabled).
If you need to select a character, use SetSelectionBounds method.
would you tell me how to get the nth character coordinates?
Post Reply