Page 1 of 1

Position PRIM_IMAG component programmatically

Posted: Sun Jul 13, 2025 5:48 pm
by belzswd
I have a routine like the following, but I'm trying to position the Image dynamically (the literal Left/Top assignments are just a sample) -

Mthroutine Name(RevealImage)
#Image.Left := 220
#Image.Top := 35
#Image.DisplayPosition := 1
#Image.FadeIn Delay(0) Duration(300)
#Image.Visible := True
#Image.FadeOut Delay(2000) Duration(1000) Visible(False)
#Image.Visible := False
#Image.Top := 0
#Image.Left := 0
#Image.DisplayPosition := 3
Endroutine

---ooo---
FadeIn/FadeOut is working fine, however the Left/Top positioning is not .. Instead the image is always positioned at [0,0] when it fades in/out.

What am I missing here?

Regards, Anthony.

Re: Position PRIM_IMAG component programmatically

Posted: Sun Jul 13, 2025 6:43 pm
by belzswd
FYI - I dropped the reversion to Top/Left = [0,0] at the end of the routine, & this worked - Not very intuitive, as this is after the fade-out & visible = false assignments. I'd like to return the default position [0,0] afterwards at some point, but this can be deferred.

Comments welcome. 🐏

Re: Position PRIM_IMAG component programmatically

Posted: Mon Jul 21, 2025 8:04 am
by davidbalansa
Hi

I would say the image is positioning back to [0,0] before the display updates from the FadeIn settings. You may be thinking that the command execution is pausing at the Visible True / False commands based on your FadeIn / FadeOut settings.

Also setting the DisplayPosition will not have any implications unless you are using a layout manager to control the image position.

Regards