How to switch a bitmap image between transparent and opaque.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-05-22 12:44 AM
Hi,
I have small bitmap in a window, which normally I would like it appear to be transparent (invisible) but when a flag is set to become fully opaque, when the flag is cleared go back to being fully transparent.
Kind Regards
MikeZ
Solved! Go to Solution.
- Labels:
-
TouchGFX
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-05-22 5:38 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-05-22 5:38 AM
Hi,
Have you tried "imageX.setVisible(flag);" ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-05-23 1:53 AM
Hi @kweisi50​,
You can either use setVisible(), as suggested by @eng23​, or use setAlpha():
//Set invisible
image.setAlpha(0);
image.setVisible(false);
//Set fully visible
image.setAlpha(255);
image.setVisible(true);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-05-24 3:00 AM
Hi Martin/eng23,
Sorry for the delay in replying, thanks for you solution.
MikeZ
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-05-24 3:59 AM
You're welcome!
