Beranda > Delphi > How to create multiline hints

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.
Iklan
Kategori:Delphi
  1. Belum ada komentar.
  1. No trackbacks yet.

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s

%d blogger menyukai ini: