I am trying to achieve a pre-fill input textBox like the one in the picture at the bottom.
I could not find such function. Is there one?
So for that I just put a label inside the input textBox/EditField and I want to make it disappear whenever someone focuses on it and appear whenever looses focus.
For that I am attempting the following but it does not work.
SProject::SProject()
{
CtrlLayout(*this, "Window title");
Sizeable().Zoomable();
//LogInTxtBox is the EditField tool name
if (LogInTxtBox.FocusCtrl()){HideBoxText();}
//or
LogInTxtBox.Focus() <<= THISBACK(HideBoxText);
}
void SProject::HideBoxText(){
usernameBox.SetLabel("");
}
And BTW is the EditField the right tool to use for an inputBox?
How can I extract the input text from an EditField?