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 » Buttons in Array using ArrayCtrl
Buttons in Array using ArrayCtrl [message #37757] Fri, 09 November 2012 19:30 Go to previous message
nejnadusho is currently offline  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
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Changing EditFields from header files
Next Topic: No Export to PDF button in Windows?
Goto Forum:
  


Current Time: Sun Apr 28 18:34:05 CEST 2024

Total time taken to generate the page: 0.03639 seconds