Lazarus
Programming => LCL => Topic started 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.
-
https://wiki.freepascal.org/RichMemo
-
https://wiki.freepascal.org/RichMemo
It doesn't include the toolbar, does it?
-
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.
-
Shouldn't be too difficult to implement, using either a panel or a frame to group both controls ;)
-
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
-
What's the problem with plain-old TToolbar and a few buttons with mostly one-liner code calling the corresponding RichMemo method?
-
Something like this: http://lazplanet.blogspot.com/2013/12/create-rich-text-editor-for-yourself.html
-
Sorry this image from the Wiki lead me to think it did have a tool bar
-
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. :)
-
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