Recent

Author Topic: RichEdit with toolbar incorporated component like DevExpress  (Read 2341 times)

BSaidus

  • Hero Member
  • *****
  • Posts: 538
  • lazarus 1.8.4 Win8.1 / cross FreeBSD
RichEdit with toolbar incorporated component like DevExpress
« on: April 21, 2021, 06:53:24 pm »
Hello;
I wonder if there is a Richedit Component with a toolbar on it (all in one ) for lazarus/

Thank you.
lazarus 1.8.4 Win8.1 / cross FreeBSD
dhukmucmur vernadh!

AL

  • Sr. Member
  • ****
  • Posts: 256
Laz 3.1, fpc 3.2.2, Win10
Laz 3.1  fpc 3.2.2, MacOS Monterey running on VMWare/Win 10
Laz 3.1  fpc 3.2.2 Ubuntu 20.04

lucamar

  • Hero Member
  • *****
  • Posts: 4219
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus/FPC 2.0.8/3.0.4 & 2.0.12/3.2.0 - 32/64 bits on:
(K|L|X)Ubuntu 12..18, Windows XP, 7, 10 and various DOSes.

BSaidus

  • Hero Member
  • *****
  • Posts: 538
  • lazarus 1.8.4 Win8.1 / cross FreeBSD
Re: RichEdit with toolbar incorporated component like DevExpress
« Reply #3 on: April 22, 2021, 10:42:33 am »
Are you lazy?
 >:(
Yep, but if there is, why doing it 2nd time ;)

@AL
Yes, RichMemo I use it.

@lucamar
It does not include it,
I'll try to do it with simple actions.


Thanks.
lazarus 1.8.4 Win8.1 / cross FreeBSD
dhukmucmur vernadh!

lucamar

  • Hero Member
  • *****
  • Posts: 4219
Re: RichEdit with toolbar incorporated component like DevExpress
« Reply #4 on: April 22, 2021, 11:30:13 am »
Shouldn't be too difficult to implement, using either a panel or a frame to group both controls ;)
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus/FPC 2.0.8/3.0.4 & 2.0.12/3.2.0 - 32/64 bits on:
(K|L|X)Ubuntu 12..18, Windows XP, 7, 10 and various DOSes.

dbannon

  • Hero Member
  • *****
  • Posts: 2778
    • tomboy-ng, a rewrite of the classic Tomboy
Re: RichEdit with toolbar incorporated component like DevExpress
« Reply #5 on: April 22, 2021, 12:53:46 pm »
You could also consider KMemo, part of KControls if cross platform is important.  But you will need to build your own tool bar there too !

http://wiki.freepascal.org/KControls/KmemoNotes

Davo
Lazarus 2, Linux (and reluctantly Win10, OSX)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

wp

  • Hero Member
  • *****
  • Posts: 11830
Re: RichEdit with toolbar incorporated component like DevExpress
« Reply #6 on: April 22, 2021, 01:43:50 pm »
What's the problem with plain-old TToolbar and a few buttons with mostly one-liner code calling the corresponding RichMemo method?

fred

  • Full Member
  • ***
  • Posts: 201

AL

  • Sr. Member
  • ****
  • Posts: 256
Re: RichEdit with toolbar incorporated component like DevExpress
« Reply #8 on: April 22, 2021, 05:00:25 pm »
Sorry this image from the Wiki lead me to think it did have a tool bar
Laz 3.1, fpc 3.2.2, Win10
Laz 3.1  fpc 3.2.2, MacOS Monterey running on VMWare/Win 10
Laz 3.1  fpc 3.2.2 Ubuntu 20.04

lucamar

  • Hero Member
  • *****
  • Posts: 4219
Re: RichEdit with toolbar incorporated component like DevExpress
« Reply #9 on: April 23, 2021, 12:11:09 am »
What's the problem with plain-old TToolbar and a few buttons with mostly one-liner code calling the corresponding RichMemo method?

Nothing, which is why I suggested it (though with less detail, true). Only he wants a kind of "combined" single control (like, say, TLabeledEdit), which is why I suggest using a panel or a frame to "join" both, the richedit control and a toolbar/coolbar. :)
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus/FPC 2.0.8/3.0.4 & 2.0.12/3.2.0 - 32/64 bits on:
(K|L|X)Ubuntu 12..18, Windows XP, 7, 10 and various DOSes.

dbannon

  • Hero Member
  • *****
  • Posts: 2778
    • tomboy-ng, a rewrite of the classic Tomboy
Re: RichEdit with toolbar incorporated component like DevExpress
« Reply #10 on: April 23, 2021, 10:10:58 am »
There would little point in having the 'Richness' apply to all the text at the same time, so you need to be able to, for example, when user clicks bold, apply the bold attribute to currently selected test, or if nothing selected, set an attribute that subsequent text follows.  But it gets a bit complicated when you consider that there are a number of attributes, when you turn bold on, the italic, highlight, underline etc attributes must not change.  So, its not dead easy by any means, not hard but does require some code.

And people like bulleted text, hyper links .....

Every use has a somewhat different set of needs so a ready to use, all coded up toolbar would probably not be very practical, it would 'almost' do 'most' people's job but be quite hard to bridge that final gap.

Qt5 and MacOS does not have a very complete RichMemo by the way, works well on GTK2 and (I believe) Windows.

Davo
Lazarus 2, Linux (and reluctantly Win10, OSX)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

 

TinyPortal © 2005-2018