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... » how can i get the image in the RichText?
Re: how can i get the image in the RichText? [message #54480 is a reply to message #54478] Wed, 29 July 2020 12:09 Go to previous message
mirek is currently offline  mirek
Messages: 14258
Registered: November 2005
Ultimate Member
That needs changes in RichText/RichEdit.

However, why not... I have now added DrawSelection field to PaintInfo to customize the appearance. This is now possible in the trunk:

	RichEditWithToolBar e;
	PaintInfo pi;
	pi.DrawSelection = [](Draw& dw, int x, int y, int cx, int cy) {
		static Image m;
		ONCELOCK {
			m = CreateImage(Size(128, 128), 50 * Blue());
		}
		dw.Clip(x, y, cx, cy);
		for(int w = 0; w < cx; w += 128)
			for(int h = 0; h < cy; h += 128)
				dw.DrawImage(x + w, y + h, m);
		dw.End();
	};
	e.SetPaintInfo(pi);

[Updated on: Wed, 29 July 2020 12:09]

Report message to a moderator

 
Read Message icon3.gif
Read Message
Read Message
Read Message
Read Message
Previous Topic: how to solve WhenEnter event to RichEdit
Next Topic: Documentation / more info
Goto Forum:
  


Current Time: Wed May 14 12:18:17 CEST 2025

Total time taken to generate the page: 0.01930 seconds