언어 설정

Menu
Sites
Language
Setting colors in more than one TextBox

Hi all,

Suppose if i have two or more TextBoxes placed side by side and i want to set color in them to red  on pressing of a button then how am i supposed to do it?

TextBox *pTextbox1, *pTextbox2;
pTextbox1 = new TextBox();
pTextbox2 = new TextBox();

 

In OnActionPerformed()..on the click of a button i wrote...

pTextbox1->SetColor(TEXT_BOX_STATUS_HIGHLIGHTED,Color::GetColor(COLOR_ID_RED));
pTextbox1->Draw();
pTextbox2->SetColor(TEXT_BOX_STATUS_HIGHLIGHTED,Color::GetColor(COLOR_ID_RED));
pTextbox2->Draw();
break;

Please let me know if anything else needs to be done.

 

Thanks in advance.

Edited by: Brock Boland on 17 3월, 2014 Reason: Paragraph tags added automatically from tizen_format_fix module.

Responses

2 댓글
Siddharth Singh
Try this : TextBox *pTextbox1; pTextbox1 = new TextBox(); pTextbox1->Construct(Rectangle(50, 50, GetClientAreaBounds().width-80, 300), TEXT_BOX_BORDER_ROUNDED); AddControl(pTextbox1); OnActionPerformed : pTextbox1->SetColor(TEXT_BOX_STATUS_NORMAL ,Color::GetColor(COLOR_ID_RED)); //status should be set to normal pTextbox1->Draw();
Bikramjit Das
yes you are right..now i get it..at a time only one box can be in the highlighted state..Thanks Siddharth.