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 » RichText,QTF,RTF... » RichEdit Questions
Re: RichEdit Questions [message #2579 is a reply to message #2578] Tue, 18 April 2006 01:57 Go to previous messageGo to previous message
fudadmin is currently offline  fudadmin
Messages: 1321
Registered: November 2005
Location: Kaunas, Lithuania
Ultimate Contributor
Administrator
mentaltruckdriver wrote on Tue, 18 April 2006 00:49

Sorry about that, I was rushing Razz

Could you please answer my question?

Thanks.


in display example
#include "CtrlLib/CtrlLib.h"

struct FontFaceDisplay : Display {
	virtual void Paint(Draw& w, const Rect& r, const Value& q,
		               Color ink, Color paper, dword style) const
	{
		Font fnt = Font(q, r.Height() - 2);
		String txt = Font::GetFaceName(q);
		w.DrawRect(r, paper);
		w.DrawText(r.left + 2, r.top + (r.Height() - w.GetTextSize(txt, fnt).cy) / 2, txt, fnt, ink);
	}
};

struct MyApp : TopWindow {
	DropList dl;
	
	MyApp()
	{
		Add(dl.HSizePos().TopPos(5, Ctrl::STDSIZE));
		dl.SetDisplay(Single<FontFaceDisplay>());
		for(int i = 0; i < Font::GetFaceCount(); i++)
			dl.Add(i);
		SetRect(0, 0, 200, 70);
	}
};

GUI_APP_MAIN
{
	MyApp().Run();
}

 
Read Message icon5.gif
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: QTF Justification
Next Topic: Is there a qtf page-break?
Goto Forum:
  


Current Time: Sat May 18 16:39:57 CEST 2024

Total time taken to generate the page: 0.01344 seconds