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... » Does a Ctrl may be a RichObject ?
Re: Does a Ctrl may be a RichObject ? [message #52510 is a reply to message #52496] Mon, 14 October 2019 10:35 Go to previous message
mirek is currently offline  mirek
Messages: 14255
Registered: November 2005
Ultimate Member
jjacksonRIAB wrote on Thu, 10 October 2019 17:57
mirek wrote on Thu, 08 October 2009 16:32

Use RichTextLayoutTracer to find out where are positions of various widgets you want to display (invent some way how to specify that in Qtf, e.g. misusing text in index would work), then, having positions, overlay them over the RichText.

Mirek


I know this is an old topic but I have an interest in doing something like this for the project I'm working on, but I'm using Raw RichText, the code hierarchy is proving quite difficult to understand and I don't know if the information here is still up to date. Could you perhaps provide some direction as to where I can obtain the graphical extents of an element, a Para, or even a Cell etc so I can position a Ctrl to track with it?


It basically hijacks Paint.

You need to create your own RichTextLayoutTracer derived instance. Then pointer to it into your PageDraw derived instance. PageDraw::Paint can/should be NOP. Then call RichText::Paint with this page draw and you should get Layout coordinates in RichTextLayoutTracer methods.

(I do not have a good example right now... I might prepare something later.)

Mirek
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: RichEdit assertion
Next Topic: How do I detect if the data in a RichEdit was changed by user?
Goto Forum:
  


Current Time: Sat Apr 26 09:58:34 CEST 2025

Total time taken to generate the page: 0.00846 seconds