How to Obtain all Characters in Delphi 4+ IDE

Posted December 15th @ 4:12 pm by m3Rlin

Starting with Delphi 4 certain shortcuts have changes and/or been added that make it hard to put certain letters into the Code Editor or Object Inspector. For example the Polish letter “ś” is entered by pressing Alt + S. Well, Delphi doesn’t make this possible because Alt + S is already assigned as an IDE [...]

How to Get a String’s Width in Pixels, Not in Characters

Posted December 15th @ 7:27 am by m3Rlin

To determine the width of a string in pixels using the active font and output it’s best to use this method:

(* sString - (string) Can be any string constant or variable.
**
** For example:
** TCanvas.TextWidth(’m3Rlin’);
** TCanvas.TextWidth(Edit1.Text);
** TCanvas.TextWidth(OpenDialog1.FileName);
[...]