Delphi Text Edit Control with background colour - delphi

Does Delphi (or even Lazarus with Free Pascal) have a control that displays text and allows you to set the background colour of each individual character?
Thanks

Yes, it does.
See TRichMemo. Moreover in comparison with the TRichEdit in Delphi it has an advantage - it is cross-platform.
Also consider this question and my answer. They might be useful.

Related

How to Make a form snap to edges of the screen

I just recently started learning Firemonkey, so if the question is stupid, please do not kick. How can I make a Firemonkey form that sticks to the edges of the screen. In VCL is easily done by using the properties ScreenSnap: = true and SnapBuffer: = 15 for example. Another way - processing messages WM_WWINDOWPOSCHANGING or WM_MOVING. How can I make the same with FireMonkey?
Thanks.
Since FMX is platform neutral, doing platform specific things is a lot harder. It should become a little easier with FM2 that ships with Delphi XE3 now.
For Delphi XE2, probably the easiest way is to wrap your FMX stuff in a VCL form.

Delphi cutting glass

I'm using Delphi XE2, and I like glass effects, and I want to "cut" glass as in Windows 7 tablet tools.
If you also know how cut a button I'll be happy if you tell me how.
Thanks
Drawing in the top area is simply a matter of using a glass frame and painting in the non-client area, or alternatively, using the DwmExtendFrameIntoClientArea API.
The best code sample I have seen for this is the VCL "Ribbon" control, which provides a "QAT" (quick Access toolbar) area, painted in the "non client area".
Note that the author has to think not only about how to render when Vista/Win7 systems which have Glass ON, but also has to decide how to render on WinXp, Win7 and Vista when the Themes engine is off. There is quite a bit of logic in the Vcl.Ribbon.pas (or just Ribbon.pas if you're in XE or earlier) unit dedicated to that.
Look at procedure TCustomRibbonQuickAccessPopupToolbar.NCPaint(DC: HDC); in the Vcl Ribbon sources.
Drawing a non-rectangular "extended area" that protrudes from the bottom is probably a matter of applying a custom window clipping region.
Did you mean you want shaped forms? If so
Irregularly shaped forms
could help. I imagine this will work on Windows 7 (note Remy's comment in the answer).
hth

VCL RichEdit component suggestion

I tried to implement vertical paragraph alignment feature to TRichEdit control. It is such a headache. And i also need transparent background support from RichEdit control. Can you suggest any free or paid VCL RichEdit component that has full RTF support and transparent background support.
WPTools is a descent Rich Text Editor as it has much of the functionality of MS Word's RTF format. I don't recall how much it costs.
The main drawback I notices when working with it was some outline formatting issues.

Ugly "disabled" images of TMainMenu

Delphi 2010, Win32 VCL. I need to create a main menu for my application with the most standard look. TMainMenu looks nice in all Windows versions, the only bad thing is when it displaying images for items with Enabled=False.
Delphi has some strange method for building that disabled images (b/w extrusion with bevels, for me it looks like spew). I want to make a patch for that procedure in VCL sources and let menu to select disabled images from the same TImageList, but I can't find it.
Is it exists at all or it is some standard windows API call? Do you know where is that procedure located?
Sure OwnerDraw style can fix all this but I want a bit faster solution.
There's a great post on Galfar's Lair blog which describes the problem, and has code for a workaround, overriding the TImageList DoDraw method.
Here's the pic (linked) showing the 'before' and 'after'.
I think this relates to pretty much all Delphi versions.
If you can provide your images as PNG you can use TPngImageList from PngComponents. It has different options to make a blended or grayscaled disabled image. The PNG format allows you to make use of alphablending.

Looking for a simple graphical component for Delphi

I am looking for a graphical component in Delphi winch have such features:
allows to paint text in different font types, sizes and colors
allows to select previously drawn text and copy it
paints images on a given coords, gif support would be nice
its very fast in terms of CPU usage
I need this component as a main chat window. I don't want to use it as a text editor.
I've tried two solutions so far:
TVirtualStringTree
THtml
Currently I am using THtml. It performs quite nice but it is a bit to slow due to two facts:
It supports many features which are not necessary in my case
Each time I want to add some content to it, I must reload the whole content
I really don't want to go into its sources and modify them until I have no other choice. So maybe someone of you knows some nice lightweight component which I can use instead?
Take a look at TRichView. It's derived from TCustomControl so no external dependencies. It's third party commercial component, but a very good one. Skype Win client uses it.
What about a TRichEdit? Most of the things you mention should be easiliby possible with this component.
Concering the insertion of a bitmap, see this article on Delphi 3000.
Did you consider using TWebBrowser?
At least it ticks all your boxes...

Resources