cancel
Showing results for 
Search instead for 
Did you mean: 

how can i change position of entered text of keyboard (The area where text is written ) and color of it ?

aarba.1
Associate II
 
2 REPLIES 2
SofLit
ST Employee

Hello,

If you're talking about a position and color that will never change, it's done by TouchGFX designer itself.

If you're talking about a dynamic change, in your <screen>View.cpp

Normally you call:

<yourtext>.setPosition(<X position>, <Y position>, <width>, <heigth>);

<yourtext>.setColor(touchgfx::Color::getColorFromRGB(<R value>, <G value>, <B value>)); or <yourtext>.setColor(touchgfx::Color::getColorFrom24BitRGB(<R value>, <G value>, <B value>));

<yourtext>.invalidate();

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.
aarba.1
Associate II

thanks for replay , but i talk about standard keyboard custom container , i found it i can change it in ( keyboardLayout.hpp ) file .

in this structure :

static const Keyboard::Layout layout =

{

   BITMAP_KEYBOARD_BACKGROUND_ID,

   keyArray,

   30,

   callbackAreas,

   3,

   Rect(10, 10,781, 312),  ////baraye toghiyire makane khoruji

   TypedText(T_ENTEREDTEXT),

#if !defined(USE_BPP) || USE_BPP==16

   0x215249,   ///// baraye taghire range khoroji

#elif USE_BPP==24

   0xFFFFFF,

#elif USE_BPP==8

   0xFF,

#elif USE_BPP==4

   0xF,

#elif USE_BPP==2

   0x3,

#else

#error Unknown USE_BPP

#endif

   Typography::KEYBOARD,

   0

};