Recent

Author Topic: [solved] Are there "usual dialogs" in TRichMemo?  (Read 900 times)

Nicole

  • Hero Member
  • *****
  • Posts: 970
[solved] Are there "usual dialogs" in TRichMemo?
« on: July 12, 2022, 11:13:09 am »
Below my TRichMemo I want to have buttons for "format the selected tex in bold" and "underline" and "change color" and "change font size".

Is it necessary to do this one by one or are there prefab dialogs?
I remember to have them seen, but I have no idea, where it was. Do I err?
Or are there on another bar as TRichMemo?

« Last Edit: July 14, 2022, 06:02:59 pm by Nicole »

rvk

  • Hero Member
  • *****
  • Posts: 6163
Re: Are there "usual dialogs" in TRichMemo?
« Reply #1 on: July 12, 2022, 11:37:10 am »
You can take a look at an example that came with TRichMemo.
in onlinepackagemanager\packages\richmemo\samples\testsimple\project1.lpi (in your config directory).

(attached screenshot)
It works with just simple buttons.
and you could use TFontDialog for selecting text and choosing the font-style.
Downside of that, is that it's under a button. When you want bold you need to click two buttons.

If you want a direct button you can think about a TToolbar with small buttons (with glyph) for direct style manipulation.
Something like in Wordpad and Word etc.
(see second image)


rvk

  • Hero Member
  • *****
  • Posts: 6163
Re: Are there "usual dialogs" in TRichMemo?
« Reply #2 on: July 12, 2022, 11:44:00 am »
O, and here is a complete tutorial for creating a Rich Text Editor.

https://lazplanet.blogspot.com/2013/12/create-rich-text-editor-for-yourself.html

Nicole

  • Hero Member
  • *****
  • Posts: 970
Re: Are there "usual dialogs" in TRichMemo?
« Reply #3 on: July 12, 2022, 03:42:47 pm »
thank you so much for the answers!

 

TinyPortal © 2005-2018