Defining Images

Kight Riot

Member
Licensed User
Longtime User
I would like to randomly choose an image for a button or ImageView with out having to create a bunch of them that just aren't visible.

Example:
An image shows up (maybe an apple) and the ... narator ... tells them the word and the user has to choose the letter that it starts with.

The correct letter (A) is obviously one of the choices and then there are 3 other random choices (Y, R, W) on the screen. I don't really want to limit the random choices to just a few different letters and would like all the letters (a-z) to be one of the possible random ones that might show up.

Is there a way to not set the image file on the button or an ImageView and then define it later in the code.

Thanks
 

sorex

Expert
Licensed User
Longtime User
You can use loadbitmap to load a bitmap into a view that is bitmap capable.

Use the search and I bet you'll find several examples on how to use it.
 
Upvote 0

Kight Riot

Member
Licensed User
Longtime User
Solved

Thanks for the reply heading me in the right direction. Ended up using ...

ImageView0.Bitmap=LoadBitmap(File.DirAssets,"apple.bmp")
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…