OK I now understand a little better. The Initialize sets the ScrollView2D variable to the actual size of the photo, so I've now put that in Sub DisplayDetails as that's where each photo is provided. The AddView sets the screen space (i.e. to that occupied by ImageViewPhoto which I created in the Abstract Designer) for displaying the photo (held in Bitmap Main.Photo). The appropriate revised code is shown below:
Code:
SV2DPhoto.Initialize(Main.Photo.Width, Main.Photo.Height, "")
Activity.AddView(SV2DPhoto, ImageViewPhoto.Left, ImageViewPhoto.Top, ImageViewPhoto.Width, ImageViewPhoto.Height)
SV2DPhoto.Panel.SetBackgroundImage(Main.Photo)
SV2DPhoto.HorizontalScrollPosition = 0
SV2DPhoto.VerticalScrollPosition = 0
The photo now displays where it should and allows both horizontal & vertical scrollong on it. I'll have to think about how to cope with orientation change. However, the problem I'm now getting is that the display of other views (i.e. outside that defined by ImageViewPhoto) is now affected by SV2DPhoto. You can see this in ViewRuntime.png in the attached View.zip: underneath Rue des Rosiers (near the top left) it should say Paris (in the LabelCentre view, shown on ViewLayout.png in the attached View.zip) & France (in the LabelCountry view, shown in ViewLayout.png), the ScrollViewInformation (containing scrollable text in LabelInformation) has been pushed downwards. The only reason that I can think of is the above code for SV2DPhoto.HorizontalScrollPosition = 0 & SV2DPhoto.VerticalScrollPosition = 0: do they refer to positions relative to the top left of SV2DPhoto as screen co-ordinates (as per using a ScrollView)? Or is there another reason?