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 » 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 Go to previous message
fudadmin is currently offline  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

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: ArrayCtrl: is it possible to set gaps between cells? [NEEDS IMPLEMENTATION...]
Next Topic: How to sort the ArrCtrl [SOLVED]
Goto Forum:
  


Current Time: Wed May 15 06:32:23 CEST 2024

Total time taken to generate the page: 0.03158 seconds