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 » U++ Library support » ArrayCtrl, HeaderCtrl & GridCtrl » GridCtrl samples with all functions and methods
Re: GridCtrl samples with all functions and methods [message #26018 is a reply to message #26015] Fri, 26 March 2010 10:21 Go to previous messageGo to previous message
Ficko is currently offline  Ficko
Messages: 3
Registered: March 2010
Junior Member
Oh I just practically "copy-paste" the samples from
"Used packages/GridCtrl/Tutorial" Embarassed

I am not saying that anything is wrong with the package only that it is useless for a novice like me without a good manual. Confused

Here is the test case I tried to tinker following the "Tutorial".

Quote:


#include <GridCtrl/GridCtrl.h>

using namespace Upp;

struct App : TopWindow
{
typedef App CLASSNAME;

GridCtrl grid;

App()
{
EditString name;
EditInt age;
Add(grid.SizePos());
grid.AddColumn("Name").Edit(name); //This dosn't work
grid.AddColumn("Age").Edit(age);//Or I am missing a callback not explained in help
grid.Add("Ann", 21)
.Add("Jack", 34)
.Add("David", 15);
//grid.WhenLeftDouble = THISBACK(ShowInfo); //This works
//grid.WhenRowChange = THISBACK(RandomColor); //This dosn't compile
}
void ShowInfo()
{
PromptOK(Format("%s is %d years old", grid(0), grid(1)));
}
void RandomColor()
{
grid.GetRow().Bg(Color(rand() % 255, rand() % 255, rand() % 255));
}
};


GUI_APP_MAIN
{
App().Run();
}

 
Read Message icon5.gif
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Problem - GridCtrl::Get(int,int) with DropTree
Next Topic: Copy GridCtrl cell when read only
Goto Forum:
  


Current Time: Wed May 15 05:42:23 CEST 2024

Total time taken to generate the page: 0.01706 seconds