Home » Developer & Programmer » Forms » An image on a form
An image on a form [message #226807] Mon, 26 March 2007 11:03 Go to next message
Phillawson
Messages: 18
Registered: December 2006
Location: Derby UK
Junior Member
Hi there, you will no doubt think that this is the most stupid question you've ever been asked but it's had myself and a couple of others scratching our heads for quite a while.
Here goes, how do you put a picture on a form in Developer 10G? I don't mean one stored in a database I mean a static picture stored on the hard drive. It doesn't have to change, it's just a picture.
We've tried everything and we know we must be missing something but we don't know what.
Re: An image on a form [message #226870 is a reply to message #226807] Mon, 26 March 2007 16:25 Go to previous messageGo to next message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Go to Oracle Online Help System (select Help menu in Forms Developer, select Online Help / or, press <Ctrl + H>). Go to "Search" tab and search for "read_image_file" built-in. It has a nice example which will, I'm sure, help you to successfully display the image on your form.

If you, however, fail to do so, post your code back here so that we could help you further.

Basically, this is the simplest code which you might use:
read_image_file('c:\temp\my_dog.gif', 'GIF', 'image_item');
Re: An image on a form [message #227206 is a reply to message #226870] Tue, 27 March 2007 09:19 Go to previous messageGo to next message
Phillawson
Messages: 18
Registered: December 2006
Location: Derby UK
Junior Member
Hmm, Developers Help is a bit like Microsofts help. It assumes you know the answer to the question already I think. Basically I am someone who only really gets chance to use developer when a student comes with a problem, then I'm expected to be an expert all of a sudden. As you can probably guess I work in a University student helpdesk.

Anyway,The student has a table called Person with an ID number field and a Name field that's a Varchar2. They've put an image item onto their form and want to display a picture in it. I've tried putting a Trigger on the Image item but I'm not sure what type of trigger it should be. (WHEN_NEW_ITEM_INSTANCE ?).

They were just trying to put a fixed image on the form but I'd like to be able to use the method shown in the help.
does this make sense?
Thanks,
Phil.
Re: An image on a form [message #227264 is a reply to message #227206] Tue, 27 March 2007 14:48 Go to previous messageGo to next message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
POST-QUERY, perhaps?
Re: An image on a form [message #227446 is a reply to message #227264] Wed, 28 March 2007 05:00 Go to previous messageGo to next message
Phillawson
Messages: 18
Registered: December 2006
Location: Derby UK
Junior Member
Thanks for your help, Mr Thick here forgot to change the database item on the image item property to 'No' from 'Yes'. your advice was much appreciated.
Re: An image on a form [message #227613 is a reply to message #227446] Wed, 28 March 2007 15:36 Go to previous messageGo to next message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I'm glad you made it work!
Re: An image on a form [message #227948 is a reply to message #227613] Fri, 30 March 2007 06:33 Go to previous messageGo to next message
Phillawson
Messages: 18
Registered: December 2006
Location: Derby UK
Junior Member
How to put an image onto a canvas which was what I was originally trying to do and couldn't? Well it was Edit - Import - Image!!
I am now kicking myself severely and am considering a job cleaning cars!
Re: An image on a form [message #227952 is a reply to message #227948] Fri, 30 March 2007 06:49 Go to previous message
Frank
Messages: 7901
Registered: March 2000
Senior Member
Relax! In a lot of ways, Forms is far from intuitive. It was never meant to be part of MS Office, so anyone can work with it.
It is a tool used by professionals, so you can't blame yourself if you don't work with it regularly!

Anyway, thanks for the feedback. This will help people that are directed here through search engines!
Previous Topic: master detail relation problem
Next Topic: Disable Menu
Goto Forum:
  


Current Time: Sun Feb 02 13:11:46 CST 2025