Home » Community » Newbie corner » GridCtrl help needed
GridCtrl help needed [message #32650] |
Tue, 31 May 2011 13:28 |
|
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
|
|
|
Goto Forum:
Current Time: Thu May 23 18:47:28 CEST 2024
Total time taken to generate the page: 0.02434 seconds
|