Using ImageView

sultan87

Active Member
Licensed User
Longtime User
Hello
I have an imageview I initialize as follows
Img_name = List_Cartes_R.Get (i) & "_T.png"
img_Carte_T.initialize ("Cartes_Select")
Panel4.AddView (img_Carte_T, 70dip, 5dip, 30dip, 40dip)img_Carte_T.Bitmap = LoadBitmap(File.DirRootExternal "/Bridge/Images/Normales/", Nom_Img)img_Carte_T.gravity = Gravity.FILL
img_Carte_T.tag = i + 1
When I click on the image I want to superimpose this image with another image which means selected
How do I?
above attached images R_C.jpg + carte_selectionnee.jpg = R_C_S.jpg
Kind regards
 

Attachments

  • R_C.jpg
    R_C.jpg
    87.2 KB · Views: 386
  • Carte_Selectionnée.jpg
    Carte_Selectionnée.jpg
    4.5 KB · Views: 390
  • R_C_S.jpg
    R_C_S.jpg
    85 KB · Views: 578

giga

Well-Known Member
Licensed User
Longtime User
Hello
I have an imageview I initialize as follows
Img_name = List_Cartes_R.Get (i) & "_T.png"
img_Carte_T.initialize ("Cartes_Select")
Panel4.AddView (img_Carte_T, 70dip, 5dip, 30dip, 40dip)img_Carte_T.Bitmap = LoadBitmap(File.DirRootExternal "/Bridge/Images/Normales/", Nom_Img)img_Carte_T.gravity = Gravity.FILL
img_Carte_T.tag = i + 1
When I click on the image I want to superimpose this image with another image which means selected
How do I?
above attached images R_C.jpg + carte_selectionnee.jpg = R_C_S.jpg
Kind regards

Here is an idea for you:

You could create a card that has the Checkmark already on it, when the original card without the checkmark is selected the Checkmarked one replaces it in the exact same positon.

(just a trick) you could investigate, It would simulate the card being checked.

I am not sure about the code for this put look into replacing an image when an image is selected.

Hope this helps.
 
Upvote 0

Mahares

Expert
Licensed User
Longtime User
Here is a small example project I made for you that will allow you to toggle between a card with check mark and without as you touch it. I hope this helps.
Voici un petit example qui vous demontre l'effet quand vous cliquez sur l'image, vous superposez à cette image une autre image qui signifie selectionnée et vice versa.
 

Attachments

  • CardCheckUncheckMahares.zip
    178.2 KB · Views: 561
Last edited:
Upvote 0

sultan87

Active Member
Licensed User
Longtime User
Ok thank you
but I do not want to do all the maps as R_C_S.jpg
I have 52 cards including R_C.jpg and the carte_selectionnee.jpg
R_C_S.jpg was the resiltat that I wanted to get by the jextaposition of the two
I had thought of this solution but this made me do 52 additional maps
Are you there another solution
 
Upvote 0

wheretheidivides

Active Member
Licensed User
Longtime User
the best way is just to make a version with the check and a version without. I did a card game "Low-Joe" on play store and that's how I did things.
 
Upvote 0

PenguinHero

Member
Licensed User
Longtime User
Can't you just place the check mark image on a new panel over the current one, with transparency set on the new panel, and on the check image?

That would make it look like it was checked.

Edit: I have added a really simple project that shows the hiding/unhiding of the check over a card. In this case I use a check box, but you would place the Check panel where you needed it.
This way you only need the one set of cards.
 

Attachments

  • CheckCard.zip
    111.7 KB · Views: 421
Last edited:
Upvote 0
Top