Skip to main content
Amaresh
Associate III
April 4, 2022
Question

How do you update a textArea wildcard in a custom container from main.c?

  • April 4, 2022
  • 1 reply
  • 731 views

Could someone show me the exact steps? I have done this below but it's not doing anything. Do I need to do something in the view.cpp too?

#include <gui/containers/topBar.hpp>
 
int a=5;
 
topBar::topBar()
{
 
}
 
void topBar::initialize()
{
 topBarBase::initialize();
}
 
void topBar::handleTickEvent()
{
	a++;
	Update(a);
}
 
void topBar::Update(int number)
{
	Unicode::snprintf(textArea1Buffer, TEXTAREA1_SIZE, "%d", 5);
	textArea1.invalidate();
	textArea1.resizeToCurrentTextWithAlignment();
	textArea1.invalidate();
 
}

This topic has been closed for replies.

1 reply

MM..1
Chief III
April 4, 2022