Lazarus

Programming => LCL => Topic started by: BSaidus on April 21, 2021, 06:53:24 pm

Title: RichEdit with toolbar incorporated component like DevExpress
Post by: BSaidus 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.
Title: Re: RichEdit with toolbar incorporated component like DevExpress
Post by: AL on April 22, 2021, 03:46:19 am
https://wiki.freepascal.org/RichMemo
Title: Re: RichEdit with toolbar incorporated component like DevExpress
Post by: lucamar on April 22, 2021, 09:08:48 am
https://wiki.freepascal.org/RichMemo

It doesn't include the toolbar, does it?
Title: Re: RichEdit with toolbar incorporated component like DevExpress
Post by: BSaidus 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.
Title: Re: RichEdit with toolbar incorporated component like DevExpress
Post by: lucamar 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 ;)
Title: Re: RichEdit with toolbar incorporated component like DevExpress
Post by: dbannon 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
Title: Re: RichEdit with toolbar incorporated component like DevExpress
Post by: wp 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?
Title: Re: RichEdit with toolbar incorporated component like DevExpress
Post by: fred on April 22, 2021, 04:31:10 pm
Something like this: http://lazplanet.blogspot.com/2013/12/create-rich-text-editor-for-yourself.html
Title: Re: RichEdit with toolbar incorporated component like DevExpress
Post by: AL on April 22, 2021, 05:00:25 pm
Sorry this image from the Wiki lead me to think it did have a tool bar
Title: Re: RichEdit with toolbar incorporated component like DevExpress
Post by: lucamar 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. :)
Title: Re: RichEdit with toolbar incorporated component like DevExpress
Post by: dbannon 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
TinyPortal © 2005-2018