Form and Component Editing Commands

Posted December 15th @ 3:52 pm by m3Rlin

Delphi and Kylix have a couple rather unknown form and component editing shortcuts. Here they are:

To select the form when its surface is covered by components, simply Shift-Click the form.
To fine move (by 1 pixel) a selected component just press Ctrl whilst pressing the cursor keys.
To fine resize a component just press Shift whilst pressing [...]

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);
[...]

Next Entries »