«« Site Rescued »»

While the site is still going to move from its current host, a new site will now take its place. More Info.

The new site may have less content, but the core will now remain. And it will now play nicely with phones! Keep an eye on the DelphiDabbler Blog for news.

» Help

How to create multiline hints


The Delphi/Kylix Object Inspector allows changing of the Hint property (obviously...). But since Hint property is a string property, the Object Inspectory only gives you one line for this. What if you want to create multiline hints? I have seen dozens of components that give you the "ability" to create such hints. Which one is the best? None of them. Why?! Simple, althougth the Object Inspector does not allow you to create lines you can always use code. Since Hint is a string property then you can always use #13#10 for Delphi and #10 for Kylix. The hint window will appear the way you want it to. Using components for this pretty much is the sloppiest way to get around this.

ButtonWindows.Hint := '1st line'#13#10'2nd line'; // Delphi code
ButtonLinux.Hint := '1st line'#10'2nd line'; // Kylix code
If you want a way to enter multi-line strings at design time use the Extended String Property Editor.
Author: Unknown
Added: 2007-06-02
Last updated: 2007-10-12

« Return to contents »