I'm new with Necto.
I'd like to change properties of screen objects like caption of a label or color.
I've put a label and a button to the designer. Goal is to write meassured data to a caption. But I don't know how do acces the object properties.
I just found the possibilty to change the screen color within the show function. I created an OnClick function to change the color but nothing happens if I push the button. (When I touch the screen, LED RA15 gets darker)
And I can not access other objects then the screendata itself.
main_screen.c
Code: Select all
#include "main_screen.h"
#include "scr_main_screen.h"
static vtft_t *_vtft;
void main_screen_show(vtft_t *vtft)
{
_vtft = vtft;
initialize_main_screen();
// works
main_screen_data.color = 0xf000;
vtft_set_current_screen(_vtft, main_screen.screen_data);
}
void Btn_OnClick()
{
// doesn't works
main_screen_data.color = 0x00f0;
vtft_set_current_screen(_vtft, main_screen.screen_data);
// undeclared
Label1.
// undeclared
&Button1.width = 30;
}
TFT 3.5" with cap
What I'm doing wrong?
Thanks. Kelte