Home » Community » Newbie corner » Buttons in Array using ArrayCtrl
Buttons in Array using ArrayCtrl [message #37757] |
Fri, 09 November 2012 19:30  |
nejnadusho
Messages: 60 Registered: October 2012
|
Member |
|
|
Hi,
I have been trying to stuff an array with buttons and use it with ArrayCtrl and I had not had the chase to succeed.
I have been trying the following.
The .lay file has just one ArrayCtrl myArray; thrown alone on a single layout.
main.cpp
#include "test.h"
test::test()
{
//Array<Button*> myButt;
//Button* a = new Button;
//Button* b = new Button;
//myButt.Add(a);
//myButt.Add(b);
Array<Button> myButt;
myButt.Add();
myButt.Add();
CtrlLayout(*this, "Window title");
myArray.AddColumn("List of Tables");
//myArray.Add(myButt[0]->SetLabel("Push1"));
//myArray.Add(myButt[1]->SetLabel("Push2"));
myArray.Add(myButt[0].SetLabel("Push1"));
myArray.Add(myButt[1].SetLabel("Push2"));
}
GUI_APP_MAIN
{
test().Run();
}
My goal is to have a column of buttons in ArrayCtrl.
As you can see I have also been trying to be just pointers of buttons which I believe is preferable.
Any help/suggestions will be greatly appreciated.
Best,
nejnio
|
|
|
Goto Forum:
Current Time: Fri May 02 14:36:51 CEST 2025
Total time taken to generate the page: 0.03185 seconds
|