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 » Insert Ctrl editors in a single row of ArrayCtrl
Re: Insert Ctrl editors in a single row of ArrayCtrl [message #56303 is a reply to message #56300] Thu, 18 February 2021 19:08 Go to previous messageGo to previous message
Oblivion is currently offline  Oblivion
Messages: 1094
Registered: August 2007
Senior Contributor
Hello mubeta,
Try this:

#include <CtrlLib/CtrlLib.h>

using namespace Upp;

struct MyApp : TopWindow {
	ArrayCtrl array;
	MyApp()
	{
		Sizeable().Zoomable().CenterScreen().SetRect(0, 0, 800, 600);
		Add(array.SizePos());
		
			array.AddColumn("Index").WithLined([=](int i, One<Ctrl>& c){
				if(i % 2 == 0)
					c.Create<DropDate>();
				else {
					DropList& l = c.Create<DropList>();
					l.Add("a").Add("b").Add("c");
				}
			});

		for(int i = 0; i < 10; i++) {
			array.Add(i);
		}
	}
};

GUI_APP_MAIN
{
	MyApp().Run();
}


Best regards,
Oblivion


[Updated on: Thu, 18 February 2021 19:09]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Select Grid Row BY ID
Next Topic: GridCtrl - grid problem when i set focus
Goto Forum:
  


Current Time: Tue May 14 08:14:45 CEST 2024

Total time taken to generate the page: 0.02771 seconds