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   |
omari
Messages: 276 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.
|
|
|
Goto Forum:
Current Time: Mon Apr 28 12:10:01 CEST 2025
Total time taken to generate the page: 0.00522 seconds
|