Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Looking for ideas on how to show list of digital photos
Message
De
08/05/2006 12:07:09
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
08/05/2006 09:35:30
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01120012
Message ID:
01120045
Vues:
20
>I'm looking for some ideas on how to show a list of digital photos within my application. The reason for the list of digital photos is so users can drag and drop one or more images on a detail container as a way of attaching additional documentation about a record.
>
>Here are the approaches I'm considering:
>
>1. Displaying images in a 1 column grid using a container control that displays image, file name, and some image properties (size, datetime, etc)
>
>2. Using a vertically 'scrollable' container with an image control for every image
>
>3. Using a container with a fixed number of image controls (enough to cover the visible area of the container) that uses logic to move/update the image controls on a scroll event
>
>4. Embedding a webbrowser control or "shell.explorer.2" control configured to display images as thumbnails

I've done all of this, and either way, you'd need a separate control for each image, even if it's in a grid. In a grid, you'd have to have a dynamiccurrentcontrol pointing to the image control which holds the image for the current record, which is equally cumbersome as the others.

Programmatically, 4 would be the simplest, but you'd have margins and other stuff introduced by the browser that may be hard to control (unless you have lots of space on your form, which I doubt :). I'd go with (3), seems the simplest. You can always keep a limited set of image controls, and set them to refresh (i.e. take their image name) from an array. Unfortunately, image control doesn't have a .refresh event, so some coding there is due. So you'd have to have one method on the form which would fill the array (array property of the form, that is) with image names or blanks, and would set the .picture property for each image control.

I have one such form, and the code to do this wasn't too hard to do. In the previous version of the form, I tried the grid, but having just six image controls right on the form was far simpler (and the user wanted them lined up horizontally anyway :).

A nice addition was to resize the image on doubleclick, and then resize it back to thumbnail on .mouseLeave().

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform