XbpHtmlViewer() question

This forum is for general support of Xbase++
Post Reply
Message
Author
reganc
Posts: 257
Joined: Thu Jan 28, 2010 3:08 am
Location: Hersham, Surrey, UK
Contact:

XbpHtmlViewer() question

#1 Post by reganc »

Just recently we have started using XbpHtmlViewer() to view images instead of using XbpBitmap objects.

The upside is that you get the ability to view remote images using a URL which also works for local images.
The downside is that you don't seem to get a lot of control over how the image is displayed.

Using the bitmap objects meant that we had the ability to scale the image to fit the area onscreen (which did not always work nicely as scaling up large images looked horrible if the image was too small).

Because scaling the image is not an option, I have been asked to look into whether we can instead reposition the image within the scollable area so that we are at least seeing the centre of the image when it is first loaded instead of the top left corner which more often than not is white empty space due to the image borders.

Does anyone know if that is possible?

As an alternative to that, is there any other way to show an image from a URL? It seems that I could download the image on demand but then I would have to manage the downloaded images for the current session, removing them after the current session has ended which seems a lot of work...
Regan Cawkwell
Real Business Applications Ltd
http://www.rbauk.com

User avatar
rdonnay
Site Admin
Posts: 4729
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: XbpHtmlViewer() question

#2 Post by rdonnay »

Regan -

XbpHtmlViewer() is an HTML client, so you would need to look at specifics of HTML to determine this.

My suggestion would be to embed the image into a table because you have more control over resizing.

<table ... options>
<tr>
<tc>
<image>
</tc>
</tr>
</table>

Roger
The eXpress train is coming - and it has more cars.

Post Reply