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++ Library : Other (not classified elsewhere) » How to catch and overwrite child control event?
Re: How to catch and overwrite child control event? [message #13685 is a reply to message #13683] Tue, 22 January 2008 07:42 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 13979
Registered: November 2005
Ultimate Member
#ifndef _TestUpp_TestUpp_h
#define _TestUpp_TestUpp_h

#include <CtrlLib/CtrlLib.h>

using namespace Upp;

class DocEditEx : public DocEdit
{
	virtual bool Key(dword key, int count) {
		return DocEdit::Key(key < 65536 ? ToUpper((wchar)key) : key, count);
	}
};

#define LAYOUTFILE <TestUpp/TestUpp.lay>
#include <CtrlCore/lay.h>

class TestUpp : public WithTestUppLayout<TopWindow> {
public:
	typedef TestUpp CLASSNAME;
	TestUpp();
};

#endif


The problem is that class you use in .lay has to be defined before including .lay file.

Note that there is another workaround possible too: leave type field in .lay empty, then add the field in the final class, as public member. Of course, perhaps you do not need a .lay at all, for such simple case...

Mirek
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: BUG in UVS2 2384 release
Next Topic: Bug in UVS2 2399 release
Goto Forum:
  


Current Time: Sun May 12 22:50:17 CEST 2024

Total time taken to generate the page: 0.02308 seconds