Reply to: Image element sizing questionNovember 27, 2008 at 1:44 am
The simple answer is no: There aren't any APIs that let you do this sort of thing directly through script or direct configuration.
If you want to go to some effort, and depending on your full requirements (e.g. what image types you are working with) there could be workarounds. (From here I'm diving into untested speculation.) For example, you might be able to use an in-place control such as IE to display your images. There's information about In-Place Controls in the XMetaL Programmer's Guide. The OnInitialize macro allows you to set height and width of your control. (But you'd need to know what to set it to, and I don't know how (or even if) you can query the size of the XMetaL application window — an area requiring a little more research.)
Note that OnInitialize only lets you set the height/width at creation time (when the control is originally loaded, i.e. when the graphic is first displayed). The only other event that would let you resize later would be OnFocus, which is probably not idea.
I'm also not sure if IE itself would be a good choice for this control — I don't know how well it would handle image-resizing, or what APIs it has for displaying the image, and it might also matter to you which image formats it supports. Perhaps there are other ActiveX controls that could serve the purpose — yet more research required. Or it might also be possible to create your own custom image viewer control — now you'd really be talking about a lot of effort…