PDA

View Full Version : Getting Started



Bob Worsley
3-Oct-2009, 08:31 PM
I have a need to display some images in my VDF app, so am attempting to understand how this all works. Starting at the simplest level, maybe too simple, I copied the sample non-database code from the help and parked it on a 3dContainer in a view. After changing the path and image to something real, I ran the view and nothing displays. I would hope that something like the following would just display the image, but it doesn't. What am I doing wrong or missing?


Object oVendorImage is a dbView
Set Border_Style to Border_Thick
Set Size to 318 444
Set Location to 2 2
Object oContainer3d1 is a Container3d
Set Size to 280 428
Set Location to 10 8
Object oObjectName is a cImageContainer
Set psImagePath to "C:\VDF15.0\Projects\FreightTracker\Staging\"
Set psImage to "00001331.TIF"
Set peImageStyle to ifOriginal
Set pcBackColor to clBlack
End_Object
End_Object
End_Object

Peter Crook
4-Oct-2009, 09:20 AM
Hi Bob,

Mine is even simpler but it works:
Object oImageContainer1 is a cImageContainer
Set Size to 37 471
Set Location to 15 4
Set pcBackColor to clBtnFace
Set psImage to "StartCentreHeading.png"
Set peImageStyle to ifFitOneSide
End_Object
so no Container (it's directly in the view) and no image path (the image is in .\Bitmaps) and its not a .tiff. It's different from yours but might provide some clues.

HTH

Bob Worsley
4-Oct-2009, 09:48 AM
What the cImageContainer apparently needed was the size & location properties set, the example didn't include them (some example...) so I didn't. Now to figure out how to size the image itself.

Thanks, Peter...

Peter Crook
4-Oct-2009, 10:08 AM
What the cImageContainer apparently needed was the size & location properties set, the example didn't include them (some example...) so I didn't. Now to figure out how to size the image itself.

Thanks, Peter...Glad it helped!

AFIAK the only sizing you can do to the image is that implied by peImageStyle.

BTW I've recently noticed that the Graphics Library Help is on the Studio Tools menu.

Bob Worsley
4-Oct-2009, 10:28 AM
AFIAK the only sizing you can do to the image is that implied by peImageStyle.Don't think so. I did the following and it works nicely



In the cImageContainer: Set piZoom to 20

and added these buttons:

Object oButton1 is a Button
Set Location to 295 372
Set Label to 'Smaller'
Set peAnchors to anBottomRight

Procedure OnClick
Integer iSize
Get piZoom of oDocContainer to iSize
Sub 10 from iSize
Set piZoom of oDocContainer to iSize
End_Procedure

End_Object

Object oButton2 is a Button
Set Location to 295 320
Set Label to 'Larger'
Set peAnchors to anBottomRight

Procedure OnClick
Integer iSize
Get piZoom of oDocContainer to iSize
Add 10 to iSize
Set piZoom of oDocContainer to iSize
End_Procedure
End_Object

Peter Crook
4-Oct-2009, 11:20 AM
Thanks, Bob, hadn't spotted that.