U++ framework
Do not panic. Ask here before giving up.

Home » Community » U++ community news and announcements » LambdaConvert
LambdaConvert [message #55264] Sun, 25 October 2020 14:23
mirek is currently offline  mirek
Messages: 14291
Registered: November 2005
Ultimate Member
It is now possible to specify Convert class singleton inline with LambdaConvert:

#include <CtrlLib/CtrlLib.h>

using namespace Upp;

GUI_APP_MAIN
{
	ArrayCtrl list;
	list.AddColumn().SetConvert(LambdaConvert([](const Value& v) { return FormatIntRoman(v); }));
	for(int i = 0; i < 100; i++)
		list.Add(i);

	TopWindow win;
	win << list.SizePos();
	win.Run();
}


Mirek
Previous Topic: 2020.2 released
Next Topic: Sort (and CoSort) refactored
Goto Forum:
  


Current Time: Thu Sep 10 13:03:40 GMT+2 2026

Total time taken to generate the page: 0.02751 seconds