Hello!

I solved this by using the graphics object of the window in the paint event. A boolean switch prevented that the calculation was done again in every redraw process.

Best,
Marcel

On 30.04.2006, at 07:21, David Linker wrote:

I think there must be an elegant way of doing this, but it escapes me.

I want to dynamically resize an editfield based on the text placed in it. Currently I use the textsize + 4 as an estimate of the height, and find the last line of the text and multiply.

I think that using TextHeight would be more accurate, but it appears only to be a property of a Graphics object, and I can't find a way of recovering the graphics object either of the editfield or it's enclosing window.

I would like this to be flexible, and cross-platform, if it is not horrendously difficult.

Thanks in advance.

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to