Programmatically access images?
How do I access image resources and change a control's background image? For example, I have a gauge with a style 0 (BITMAP_BLUE_GAUGES_ORIGINAL_GAUGE_BACKGROUND_STYLE_00_ID
according to the generated code) and I want the background to change to style 1 (BITMAP_BLUE_GAUGES_ORIGINAL_GAUGE_BACKGROUND_STYLE_01_ID) on a tap of a button.
I current have the button perform the following
void Screen1View::SetGaugeStyle(touchgfx::Bitmap s)
{
gauge1.setBackground(s);
gauge1.invalidate();
}where s is touchgfx::Bitmap(BITMAP_BLUE_GAUGES_ORIGINAL_GAUGE_BACKGROUND_STYLE_00_ID);
(for testing purposes) which is the default image, but when I run the simulator, the gauge image (or rather background) is empty and gone.
What am I doing wrong? Also, how do I access other image resources programmatically?
