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 » U++ Library support » U++ Widgets - General questions or Mixed problems » EditString validation
Re: EditString validation [message #20078 is a reply to message #20065] Mon, 16 February 2009 14:16 Go to previous messageGo to previous message
Kajko is currently offline  Kajko
Messages: 14
Registered: December 2008
Location: Ireland, Serbia
Promising Member
Thanks for an answer...
now look at this if you please:

class ccc : public TopWindow {
public:
typedef ccc CLASSNAME;

EditString str1;
EditString str2;
EditString str3;

ccc()
{
SetRect( 0, 0, HorzLayoutZoom(430), VertLayoutZoom(485) );

Add(str1.LeftPosZ(100, 300).TopPosZ(10, 20));

Add(str2.LeftPosZ(100, 300).TopPosZ(30, 20));
str2.cbValid << THISBACK( validStr2 );

Add(str3.LeftPosZ(100, 300).TopPosZ(50, 20));

};

bool validStr2()
{
PromptOK( "ss" );
return true;
}

};


GUI_APP_MAIN
{
ccc().Run();
}


in CtrlCore.h i added:
class Ctrl : public Pte<Ctrl> {
public:
>>>>>>>>>THIS>>>>>>> Gate cbValid;
...

and in Ctrl.cpp i added this:
void Ctrl::LostFocus() {
>>>>>>>>>THIS>>>>>>> if( cbValid() )
>>>>>>>>>THIS>>>>>>> SetFocus();
}

so if cbValid() return true, stay where you are Smile)

BUT validStr2 HAS NEVER been called. Any idea why ?

Thanks,
Sasa


b78a07c7fb9b68436af9fd23f4e76cc5
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: What is ParentCtrl?
Next Topic: Help needed dealing with switch control
Goto Forum:
  


Current Time: Sat Jun 07 11:45:39 CEST 2025

Total time taken to generate the page: 0.04578 seconds