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 #25561 is a reply to message #25560] Mon, 01 March 2010 12:20 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 13978
Registered: November 2005
Ultimate Member
It is because SetZoom(20) - that makes the whole issue with changing page size ineffective.

Remove that and it works fine...

Of course, "physical font size" will be quite big then, so you should alter the format as well:

#include <RichEdit/RichEdit.h>

using namespace Upp;

struct MyRichEdit : public RichEdit {
	MyRichEdit() {
		NoRuler();
		ShowCodes(Null);
		ViewBorder(0);

		RichPara::Format f;
		(Font&)f = StdFont();
		RichText::FormatInfo fi;
		fi.Set(f);
		ApplyFormatInfo(fi);	
	}	
	void Layout() {
		RichEdit::Layout();
		SetPage(Size(minmax(GetSize().cx, 20, 10000), INT_MAX));
	}
};

GUI_APP_MAIN {
	MyRichEdit edit;
	
	TopWindow win;
	win.Add(edit.SizePos());
	win.Sizeable().Zoomable().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: [RTF format] - change tables and pictures
Next Topic: Get String from RichText
Goto Forum:
  


Current Time: Sun May 12 17:15:09 CEST 2024

Total time taken to generate the page: 0.03538 seconds