Skip to main content
Ebun.1
Senior
April 14, 2021
Solved

3 buttons with image

  • April 14, 2021
  • 2 replies
  • 801 views

Thank you for helping.

environment:

TouchGFX Ver 4.16.1

Prepare two released images and one pressed image.

While pressed, the pressed image is displayed.

I want to switch the image of the released image every time the button is pressed and released.

How should I implement it?

Thank you.

This topic has been closed for replies.
Best answer by MM..1

BITMAP_MENU_SEL_ID is from db you use your.

buttonWithLabel1.setBitmaps(touchgfx::Bitmap(BITMAP_MENU_SEL_ID), touchgfx::Bitmap(BITMAP_MENU_SEL_ID));

2 replies

MM..1
MM..1Best answer
Super User
April 14, 2021

BITMAP_MENU_SEL_ID is from db you use your.

buttonWithLabel1.setBitmaps(touchgfx::Bitmap(BITMAP_MENU_SEL_ID), touchgfx::Bitmap(BITMAP_MENU_SEL_ID));

Ebun.1
Ebun.1Author
Senior
April 15, 2021

Hi MM1

I am always grateful for your help.

I didn't understand what it meant, but I could understand it by looking at BitmapDatabase.cpp.

I was able to operate as desired.

Thank you very much.