At 9:42 AM +0100 4/12/06, Mark O'Neill wrote:
Probably a dumb question, but I've been racking my brain for a
solution and just can't figure it out, so any help to pull me out of
the imbecile league would be appreciated!
It's not a dumb question; you've just got yourself in a tight spot
due to having all those images in your project. Those become
identifiers in code, just like global methods. And just as you can't
get to a method from a string containing its name, you can't get to
such a picture reference from a string containing its name either,
unless you somewhere have someplace that maps strings to identifiers.
One way to do this would be to use a Dictionary, something like this:
Function Get16Version( pic As Picture )
static map As Dictionary
if map Is Nil then
map = New Dictionary
map.Value( ButtonOverImg ) = ButtonOverImg16
map.Value( ButtonOnImg ) = ButtonOnImg16
// (etc.)
end if
return map.Value( pic )
End Function
Then, whenever you want to get the 16-version of a pic from its
original pic, just call Get16Version on it.
HTH,
- Joe
--
Joseph J. Strout
[EMAIL PROTECTED]
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>