Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Adding image to pages in pageframe
Message
From
17/11/2016 11:50:31
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
01643603
Message ID:
01643622
Views:
51
>Hi there,
>
>In my application I often add an image-control to forms to set a background-picture. I now tried this
>with the pages pf the pageframe-control by using the following code:
>
>
>FOR i = 1 TO thisform.pf.Pagecount
>    thisform.pf.Pages[i].addobject("img_back","image")
>    WITH thisform.pf.Pages[i].img_back
>      .ZOrder(1)
>      .left = 0
>      .top = 0
>      .Height = Thisform.pf.Height
>      .Width = Thisform.pf.Width
>      .Anchor = 15
>      .picture = "D:\foxprogs\foxbib\images\blueform.png"    
>    Endwith
>Next
>
>
>But this does not work. The image is added but when it comes to the next-statement width and height are "reset" to a value
>of 1. Can someone tell me what I am doing wrong or missing?

Just to add to what others said, anything you .addobject(), createobject() etc initially has .visible=.f., with a good reason - so you can set it up the way you want before actually showing it, so it stays invisible and doesn't dance and flicker around while you do it. But when you're done, you should set .visible=.t.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform