That's good enough for me. Thanks!
>I haven't tested under all circumstances but I've been using it for a long time with my custom tooltip (I mean tested with regular message like texts, short or long).
>Cetin
>
>>
>Thank you Cetin. Do you happen to know, will that always work with precision, or is it just a really good guess? For example, what happens if there are some really long words in the string (like some long file names without spaces) that can cause choppy wordwrapping? Will memlines calculate wordwrap exactly the same as the editbox control? I wish there was a way to interrogate the control directly, even if it required an API call.
>>
>>>>How do I determine the number of rows of text that are currently occupying an edit box? This includes accounting for automatic wordwrapping plus processing of CR's within the contents.
>>>
>>>
>>>lnOldMemoWidth = set('memowidth')
>>>with myEditBox
>>> SET MEMOWIDTH TO floor(.Width/(FONTMETRIC(6,.FontName,.FontSize)+1))
>>> lnLines = memlines( .Value )
>>>endwith
>>>set memowidth to m.lnOldMemoWidth
>>>
Cetin