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 » Attempting to get a canvas to display...
Re: Attempting to get a canvas to display... [message #47762 is a reply to message #47761] Mon, 20 March 2017 22:59 Go to previous messageGo to previous message
omari is currently offline  omari
Messages: 266
Registered: March 2010
Experienced Member
the canvas overwrites the displayed layout because both are in the same frame.
if you want separate them, you can use Splitter:
class UppApp : public WithUppAppLayout<TopWindow>
{

	public:
		typedef UppApp CLASSNAME;
		UppApp();

		void displayMessage ( String s );

	private:
		DrawCanvas canvas;
		WithButtonLayout<ParentCtrl> buttonPanel;
		Splitter splitter;  // <-------------------------
};


UppApp::UppApp()
{
	CtrlLayout ( *this, "UppApp" );
	
	CtrlLayout ( buttonPanel );

	buttonPanel.aBtn << THISBACK1 ( displayMessage, "A" );
	buttonPanel.bBtn << THISBACK1 ( displayMessage, "B" );
	buttonPanel.cBtn << THISBACK1 ( displayMessage, "C" );

	Add(splitter);  // <-------------------------
	splitter.Horz(buttonPanel,canvas); // <-------------------------
	BackPaint();
}



for more information, you can try this examples :
SplitterFrame
Splitter
Frame


regards
omari.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Templates gone missing...
Next Topic: Link error:
Goto Forum:
  


Current Time: Wed May 08 00:56:52 CEST 2024

Total time taken to generate the page: 0.02200 seconds