tags:

views:

186

answers:

1

hi all,

i am using canvas.TextRect in delphi to output something on the screen.

but i need my text to be word wrapped in the rectangle.

any help will be appreciate.

ps: im using delphi 7.

+6  A: 

You need to use DrawText (or DrawTextEx) with the DT_WORDBREAK flag.

See the sample in this thread.

Jeroen Pluimers