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 » Community » Newbie corner » GridCtrl + rich texts
Re: GridCtrl + rich texts -- Array Control [message #50394 is a reply to message #36992] Sun, 14 October 2018 10:19 Go to previous messageGo to previous message
deep is currently offline  deep
Messages: 263
Registered: July 2011
Location: Bangalore
Experienced Member
Hi,

I am using this very old thread.

I want to have colors in grid and array controls. Want to use QTFDisplay.

ArrayCtrl example

#include <CtrlLib/CtrlLib.h>
#include <RichText/RichText.h>

using namespace Upp;

class App : public TopWindow {
public:
	typedef App CLASSNAME;
	App();

	ArrayCtrl list;
};

App::App()
{
	Title("ArrayCtrl with QTF Display");
	Sizeable().Zoomable();
	const Size sz(480, 340);
	SetRect(sz); SetMinSize(sz);

	list.AutoHideSb();
	list.SetLineCy(Draw::GetStdFont().GetCy() + 8);
	list.AddColumn("QTF");
	list.AddColumn("QTF Display").SetDisplay(QTFDisplay());

	const String qtf("[@G [1 [* (]x + y[* )]][` %d]]");
	for (int i = 0; i <= 10; ++i) {
		const String text(Format(qtf, i));
		list.Add(text, text);
		DUMP(text);
	}

	Add(list.VSizePosZ(4, 4).HSizePosZ(4, 4));
}

GUI_APP_MAIN
{
	App app;
	app.Run();
}


const String qtf("[@G [1 [* (]x + y[* )]][` %d]]"); "[@G ...]" Gives correct forground color.
"[$G ...] this will not render background Color

index.php?t=getfile&id=5675&private=0


Warm Regards

Deepak
 
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
Read Message
Previous Topic: MoveableAndDeepCopyOption inherite to use a VectorMap ?
Next Topic: Adjusting the Z order of a dialog window?
Goto Forum:
  


Current Time: Thu Mar 28 16:55:10 CET 2024

Total time taken to generate the page: 0.01655 seconds