Chicken and egg, or am I just too dumb?
I'm trying to dynamically create an interface which will contain a pinboard layout. The pinboard layout in turn will consist of drawn pinboard objects which show text snippets. The sizes and the locations of these objects are to be computed based on the extent of the text snippets. Finally, the size of the pinboard layout is determined by its objects. It is supposed to fit exactly, i.e. no empty space around it, no scrolling. Now, my problem is that in order to compute the text extents with GP:GET-STRING-EXTENT I seemingly already need to have the interface and it even has to be displayed. But when the interface is already displayed, then it's too late to compute its size as described above. I can think of a workaround where I put some dummy with an estimated size into the interface and then, once the interface has been created and displayed, compute the real size constraints and replace the dummy with the real thing. But that doesn't seem right to me. Is there a better solution? Thanks, Edi.