Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » Newbie corner » EditField.onFocus Event ?!?!?!
EditField.onFocus Event ?!?!?! [message #37539] Mon, 15 October 2012 17:19 Go to previous message
nejnadusho is currently offline  nejnadusho
Messages: 60
Registered: October 2012
Member
Hi there, Smile

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?

Thank you a lot.

nejnio
index.php?t=getfile&id=3893&private=0
  • Attachment: logIn.jpg
    (Size: 10.70KB, Downloaded 289 times)
 
Read Message
Read Message
Read Message
Previous Topic: Undeclared identifier
Next Topic: What's wrong now ? CtrlLayout
Goto Forum:
  


Current Time: Sat May 11 15:23:24 CEST 2024

Total time taken to generate the page: 0.01912 seconds