|
|
Home » U++ Library support » U++ Library : Other (not classified elsewhere) » minimalist example with GridCtrl
|
Re: minimalist example with GridCtrl [message #6456 is a reply to message #6451] |
Mon, 13 November 2006 10:48 |
|
forlano wrote on Mon, 13 November 2006 03:32 | Hello,
I've done some experiment with the GridCtrl I got from the Nico's application.
The gridctrl looks great but I wonder if it has some capability of the arrayctrl. For example can I add a droplist or a toggle button to a column?
Moreover, I was able to let appear the control but not to edit its cells. I used several options but the edit was not possibile. I would like to know if there is a very little piece of code that set a gridctrl with all the cells editable.
Thank you
Luigi
|
Yes it is possible. Just do:
EditString edit;
DropList drop;
grid.AddColumn("c0").Edit(edit);
grid.AddColumn("c1").Edit(drop);
That should be enough. I don't remember what edit mode was set as default in 0.95 version. But to edit row (all ctontrols are visible) add grid.EditMode(0). In that mode controls becom visible if you press enter or make double click on row.
Please paste your code here (or send it to me) so I could check it.
New version of grid has support for "control in every cell" mode and a tutorial. I will public it very soon.
|
|
|
|
|
Re: minimalist example with GridCtrl [message #6469 is a reply to message #6468] |
Mon, 13 November 2006 19:26 |
|
forlano wrote on Mon, 13 November 2006 12:56 |
What I am missing?
Luigi
|
You didn't read my answer carefully GridCtrl is very similar to ArrayCtrl. You must bind a column with an edit control.
Your code should like this:
...
gc.Inserting();
gc.Appending();
gc.Moving();
gc.Removing();
gc.Navigating();
gc.Searching();
gc.Editing();
EditString name, fed, rtg, title;
gc.AddColumn("name",19).Edit(name);
gc.AddColumn("fed",4).Edit(fed);
gc.AddColumn("rtg",4).Edit(rtg);
gc.AddColumn("title",4).Edit(title);
for (i=0; i<4; i++) gc.Add("0","0","0","0");
Of course all edits should be declared in your dialog class scope (not like in the coode above in constructor).
Hope that will help you
[Updated on: Mon, 13 November 2006 19:27] Report message to a moderator
|
|
|
|
|
|
|
Goto Forum:
Current Time: Sun Apr 28 22:49:39 CEST 2024
Total time taken to generate the page: 0.03802 seconds
|
|
|