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 cell consisting of edit and helper button
Re: ArrayCtrl cell consisting of edit and helper button [message #2621 is a reply to message #2620] Wed, 19 April 2006 07:53 Go to previous messageGo to previous message
fudadmin is currently offline  fudadmin
Messages: 1321
Registered: November 2005
Location: Kaunas, Lithuania
Ultimate Contributor
Administrator
ok, you can try this and tell if it's what you expected.
#include <CtrlLib/CtrlLib.h>

class Ctrl2 : public ParentCtrl {
	EditField edit;
	Button button;
public:
	typedef Ctrl2 CLASSNAME;
	Ctrl2();
	~Ctrl2() {;}
};

Ctrl2::Ctrl2()
{
	edit.SetRect(0,0,50,15); //one problem are sizes >15...
	button.SetRect(55,0,85,15);
	button.SetLabel("Help!!!");
	Add(edit);
	Add(button);
}


void Extra2(One<Ctrl>& ctrl)
{
		ctrl.Create<Ctrl2>();
}

GUI_APP_MAIN
{
	TopWindow w;
	ArrayCtrl arr;
	
	arr.AddColumn("col1",2);
	arr.AddColumn("col2",5).Ctrls(Extra2);
	arr.SetLineCy(20);
		
	arr.Add("aaa");
	arr.Add("bbb");
	
	arr.SizePos();
	w.Add(arr);
	
	w.Run();
}
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: ArrayCtrl with enabled/Disabled columns
Next Topic: how to set/get data in a composite embedded ctrl in an arrayctrl
Goto Forum:
  


Current Time: Fri Nov 01 01:15:36 CET 2024

Total time taken to generate the page: 0.02091 seconds