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 ?
Does a Ctrl may be a RichObject ? [message #23263] Mon, 05 October 2009 23:49 Go to next message
koldo is currently offline  koldo
Messages: 3004
Registered: August 2008
Ultimate Member
Hello all

I would like to know how to insert Ctrl like EditString, Button or DropList inside a RichEdit.

Here I enclose you a simulated screenshot from RichTextObject example.

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

With it it would be possible to fill forms made with RichEdit and launch functions.

Best regards
Koldo
  • Attachment: Dib.PNG
    (Size: 28.33KB, Downloaded 479 times)


Best regards
Iñaki
Re: Does a Ctrl may be a RichObject ? [message #23284 is a reply to message #23263] Wed, 07 October 2009 11:16 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 12050
Registered: November 2005
Ultimate Member
koldo wrote on Mon, 05 October 2009 17:49

Hello all

I would like to know how to insert Ctrl like EditString, Button or DropList inside a RichEdit.

Here I enclose you a simulated screenshot from RichTextObject example.

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

With it it would be possible to fill forms made with RichEdit and launch functions.

Best regards
Koldo


At the moment, this would be hard.

The only way is to use

http://www.ultimatepp.org/reference$RichTextLayoutTracer.htm l

and then place widgets over the RichText.

Mirek
Re: Does a Ctrl may be a RichObject ? [message #23288 is a reply to message #23284] Wed, 07 October 2009 12:02 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3004
Registered: August 2008
Ultimate Member
luzr wrote on Wed, 07 October 2009 11:16

koldo wrote on Mon, 05 October 2009 17:49

Hello all

I would like to know how to insert Ctrl like EditString, Button or DropList inside a RichEdit.

Here I enclose you a simulated screenshot from RichTextObject example.

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

With it it would be possible to fill forms made with RichEdit and launch functions.

Best regards
Koldo


At the moment, this would be hard.

The only way is to use

http://www.ultimatepp.org/reference$RichTextLayoutTracer.htm l

and then place widgets over the RichText.

Mirek


Sorry Mirek

Could you detail this a little bit more? Smile

Best regards
Koldo


Best regards
Iñaki
Re: Does a Ctrl may be a RichObject ? [message #23314 is a reply to message #23288] Thu, 08 October 2009 16:32 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 12050
Registered: November 2005
Ultimate Member
koldo wrote on Wed, 07 October 2009 06:02

luzr wrote on Wed, 07 October 2009 11:16

koldo wrote on Mon, 05 October 2009 17:49

Hello all

I would like to know how to insert Ctrl like EditString, Button or DropList inside a RichEdit.

Here I enclose you a simulated screenshot from RichTextObject example.

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

With it it would be possible to fill forms made with RichEdit and launch functions.

Best regards
Koldo


At the moment, this would be hard.

The only way is to use

http://www.ultimatepp.org/reference$RichTextLayoutTracer.htm l

and then place widgets over the RichText.

Mirek


Sorry Mirek

Could you detail this a little bit more? Smile



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
Re: Does a Ctrl may be a RichObject ? [message #23319 is a reply to message #23314] Thu, 08 October 2009 22:56 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3004
Registered: August 2008
Ultimate Member
Ooooh Confused

Perhaps I will try it other day...


Best regards
Iñaki
Re: Does a Ctrl may be a RichObject ? [message #52496 is a reply to message #23314] Thu, 10 October 2019 17:57 Go to previous messageGo to next message
jjacksonRIAB is currently offline  jjacksonRIAB
Messages: 62
Registered: June 2011
Member
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?

[Updated on: Thu, 10 October 2019 17:58]

Report message to a moderator

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: 12050
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
Previous Topic: RichEdit assertion
Goto Forum:
  


Current Time: Thu Oct 17 12:41:26 CEST 2019

Total time taken to generate the page: 0.01256 seconds