Hello,
I am having some trouble displaying an Image control correctly. I assigned a fixed area for it (300x300 pixel) within a Container, and defined an Image Click method that cycles through a set of files according to a global property (image dimensions vary in both size and orientation). In the Container's Refresh method I wrote:
and all images display the way I want. In the Image Click method I wrote the same assignments, but the Image control "centres" the image within the control itself and prevents me from displaying it aligned as before (e.g. a 300x200 rectangle appears 50 pixel further down). It does so as if Image controls had an internal Alignment property set to Centered (I can see this behaviour setting BorderStyle=1). Resetting Width and Height to 300 or setting a specific Anchor do not help, as they apply to the entire control.
Has anybody any suggestion? In practice, I would like to keep my image starting from the same point and having the same maximum 300-pixel size, no matter how wide or tall images are.
Regards,
Dario
I am having some trouble displaying an Image control correctly. I assigned a fixed area for it (300x300 pixel) within a Container, and defined an Image Click method that cycles through a set of files according to a global property (image dimensions vary in both size and orientation). In the Container's Refresh method I wrote:
Code:
WITH .MyImage
[indent].Stretch = 0
.Picture = "image1.jpg"
.Stretch = 1
[/indent]
ENDWITH
and all images display the way I want. In the Image Click method I wrote the same assignments, but the Image control "centres" the image within the control itself and prevents me from displaying it aligned as before (e.g. a 300x200 rectangle appears 50 pixel further down). It does so as if Image controls had an internal Alignment property set to Centered (I can see this behaviour setting BorderStyle=1). Resetting Width and Height to 300 or setting a specific Anchor do not help, as they apply to the entire control.
Has anybody any suggestion? In practice, I would like to keep my image starting from the same point and having the same maximum 300-pixel size, no matter how wide or tall images are.
Regards,
Dario