Welcome to Clarion Community Sign in | Join | Faq

Clarion 6 - General

Started by ethompson@setseg.org at 09-17-2008 5:59 AM. Topic has 2 replies.

Print Search
Sort Posts:    
   09-17-2008, 5:59 AM
ethompson@setseg.org is not online. Last active: 11/12/2008 2:23:21 AM ethompson@setseg.org

Top 500 Posts
Joined on 09-17-2008
Posts 1
Best way to show dynamic pictures in a form
Reply Quote
Looking for a technique to display a customer picture in a form that is "dynamic" based upon the customer number.
The files are jpg extension
The directory the pics are stored in is static
So, in my form, I want to display a picture of the customer, using the customer number as the picture id.

So, customer 123 will have picture 123.jpg in the picture directory

What control is best used to do this and what method is best for dynamically picking up the "correct" picture.

I suppose this technique could apply to part number = part picture as well, so seems like someone has done this already.

Thanks...eric


   Report 
   09-17-2008, 4:13 PM
Steve B. is not online. Last active: 11/5/2008 12:48:00 PM Steve B.

Top 25 Posts
Joined on 06-27-2006
Canberra Australia
Posts 22
Re: Best way to show dynamic pictures in a form
Reply Quote

Just use an image control and after window is opened or at the openwindow event use:

?Image{PROP:Text} = 'c:\imagedir\' & CUS:CustNum & '.jpg'

 


Steve B.
   Report 
   11-04-2008, 2:54 PM
Steve B. is not online. Last active: 11/5/2008 12:48:00 PM Steve B.

Top 25 Posts
Joined on 06-27-2006
Canberra Australia
Posts 22
Re: Best way to show dynamic pictures in a form
Reply Quote

Assigning the root path to a global variable should work the same as an all text string

 

GLO:ImagePath = 'c:\pics\'

?MyImage {PROP:Text} = GLO:ImagePath & CUS:SysId & '.jpg'

 

If you are having trouble I would do a simple test to verify you have the right location/file:

if not exists(GLO:ImagePath & CUS:SysId & '.jpg')

  message('File does not exist!|' & GLO:ImagePath & CUS:SysId & '.jpg')

else

  ?MyImage{PROP:Text} = GLO:ImagePath & CUS:SysId & '.jpg'

  display(?MyImage)

end

 

HTH


Steve B.
   Report 
Clarion Communi... » Clarion » Clarion 6 - Gen... » Best way to show dynamic pictures in a form

Powered by Community Server, by Telligent Systems