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++ TheIDE » U++ TheIDE: Layout (Forms) Designer » Programming for Layout Objects
Re: Programming for Layout Objects [message #1900 is a reply to message #1899] Sat, 25 March 2006 10:35 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Ok, here we go:

The only trouble with your code so far is that you have put definitions of your methods to .h file. Save_tot_Text, FileMenu, About, HelpMeny should be in .cpp

Now about that Cancel button:

Add Cancel method to your class:

class Jims_Medical : public WithJims_MedicalLayout<TopWindow> {
....	
	void Cancel();
....
};


define it e.g. like this (in .cpp):

void Jims_Medical::Cancel()
{
	if(PromptYesNo("Do you want to exit?"))
		Break();
}


and add this line to your constructor:

Jims_Medical::Jims_Medical()
{
......
	bttncancel <<= THISBACK(Cancel);
......
}


To read the value, use

void Jims_Medical::Next()
{
	int blood_pressure = ~txtbld_press;
	PromptOK(AsString(blood_pressure));
}


(Connect this Next to bttnnext_ent the same way as Cancel to bttncancel).

Mirek
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: "Edit using designer" from cpp file- nothing happens? [BUG]
Next Topic: Positioning in Designer
Goto Forum:
  


Current Time: Sun May 05 05:36:35 CEST 2024

Total time taken to generate the page: 0.01598 seconds