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 » GridCtrl help needed
GridCtrl help needed [message #32650] Tue, 31 May 2011 13:28 Go to previous message
bushman is currently offline  bushman
Messages: 134
Registered: February 2009
Experienced Member
Please, help me with the code below:

.h:
class Ma_app : public TopWindow {
	
public:
	typedef Ma_app CLASSNAME;
	Ma_app();
	
private:
	
	GridCtrl grid;
};


.cpp:

void CreateWidget(One<Ctrl>& ctrl)
{
	ctrl.Create<EditString>();
}

Ma_app::Ma_app()
{

	Zoomable().Sizeable();
			
	for(int col = 0; col < 10; col++)
		grid.AddColumn(Format("col %d", col)).Ctrls(CreateWidget);
	
	grid.Add();
	grid.GoBegin();
	for(int col = 0; col < 10; col++)
		grid.SetCtrlValue(col, "a string");
	
	Add(grid.SizePos());
}

GUI_APP_MAIN
{
	Ma_app().Run();
}


I expected GridCtrl Edits to display "a string", but got blank EditStrings instead. What am I doing wrong??

Help appreciated, thanks in advance.

[Updated on: Tue, 31 May 2011 13:30]

Report message to a moderator

 
Read Message
Read Message
Read Message
Previous Topic: How to internet enable a serial device
Next Topic: GridCtrl out-of-bound crash with test case
Goto Forum:
  


Current Time: Sun May 05 20:49:42 CEST 2024

Total time taken to generate the page: 0.02060 seconds