Home » U++ Library support » ArrayCtrl, HeaderCtrl & GridCtrl » ArrayCtrl crashes with "embedded" Ctrls referenced by Id [SOLVED]
ArrayCtrl crashes with "embedded" Ctrls referenced by Id [SOLVED] [message #2256] |
Wed, 05 April 2006 13:50  |
 |
fudadmin
Messages: 1321 Registered: November 2005 Location: Kaunas, Lithuania
|
Ultimate Contributor Administrator |
|
|
Try this code:
#include <CtrlLib/CtrlLib.h>
GUI_APP_MAIN
{
TopWindow w;
ArrayCtrl arr;
EditString editName, editSurName;
Option editAvail;
arr.SetRect(50,50,550,350);
w.Add(arr);
editName.SetRect(90,10,150,20);
w.Add(editName);
editSurName.SetRect(315,10,150,20);
w.Add(editSurName);
editAvail.SetRect(550,10,150,20);
w.Add(editAvail);
arr.AddColumn("ID","ID",3);
arr.AddColumn("Name", "Name", 20);
arr.AddColumn("SurName", "SurName", 20);
arr.AddColumn("Avail" "Avail?", 3).Ctrls<Option>(); //10
arr.Add("1","Luigi","Forlano", true);
arr.Add("2","Diego","Maradona", false);
arr.Add("3","Paolo","Maldini", false);
arr.Add("4","Roberto","Carlos", false);
arr.Add("5","David","Beckham", false);
editName <<= arr.Get(0,"Name");
// editName <<= arr.Get(0,"name"); //crash when Id "not in list"!!!
editSurName <<= arr.Get(0,"SurName");
// editAvail <<= arr.Get(0,"Avail"); //should work or at least must not crash!!!
editAvail <<= arr.Get(0,3); //works only this way
w.Run();
}
?bugs?
[Updated on: Mon, 01 May 2006 20:22] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Mon Apr 28 10:44:15 CEST 2025
Total time taken to generate the page: 0.01101 seconds
|