New topic: 

Picture in an ImageWell by typing it's name in TextField ???

<http://forums.realsoftware.com/viewtopic.php?t=45681>

         Page 1 of 1
   [ 1 post ]                 Previous topic | Next topic          Author  
Message        RickYerex          Post subject: Picture in an ImageWell by 
typing it's name in TextField ???Posted: Mon Oct 22, 2012 5:28 pm               
          
Joined: Tue Nov 29, 2011 12:50 pm
Posts: 69                I have several picture files that I want a user to be 
able to "call up" by simply either typing the name of the picture into a 
TextField or by choosing it from a ComboBox.

Example names of pics..

CLP2
CLP5
CLP6
CLP8

Example code I'm now using to display what the user wants...

select case TextField1.Text
case "CLP2"
  ImageWell1.Image=CLP2
case "CLP5"
  ImageWell1.Image=CLP5
case "CLP6"
  ImageWell1.Image=CLP6
case "CLP8"
  ImageWell1.Image=CLP8
end select


This works fine for only a few pics but what if I have 50 of them?

I would like to simply put one statement such as

ImageWell1.Image=TextField1.Text

How can I convert what is typed into the TextField to a picture data type so I 
don't get an error like the following...

"Type mismatch error. Expected Picture but got string"   
                             Top             Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 1 post ]      
-- 
Over 1500 classes with 29000 functions in one REALbasic plug-in collection. 
The Monkeybread Software Realbasic Plugin v9.3. 
http://www.monkeybreadsoftware.de/realbasic/plugins.shtml

[email protected]

Reply via email to