Multi-Line Captions for TLabel, TPanel and Buttons. Delphi VCL and FireMonkey

Implement multi-line captions in Delphi for TPanel, Tlabel and buttons (TButton, TSpeedButton, TBitBtn)

This is native Delphi code.  You don’t need to hack the form’s text file

VCL and FireMonkey source code is included

multi_line_controls

Continue reading “Multi-Line Captions for TLabel, TPanel and Buttons. Delphi VCL and FireMonkey”

Multi Line Popup Hints for Delphi VCL and FMX

Learn how to setup multi line popup hints in Delphi for any type of control for both VCL and FireMonkey.
This uses native Delphi code.  You don’t need to hack the forms’s DFM text file

multi_line_hints_3

Continue reading “Multi Line Popup Hints for Delphi VCL and FMX”

Using a reserved word as an identifier (variable name, class name etc) in Delphi

AKA Silly Delphi Party Tricks #1

Is it possible to use a reserved word as an identifier ?
For example – I want to name my variable or class “BEGIN” because, ummm, well I dont know just because.

Yes you can.  Simply prefix the the name with an ampersand “&” escape character like this

var
   &begin  : integer;  // begin is a reserved word
begin
   &begin  := 123;
end;

Continue reading “Using a reserved word as an identifier (variable name, class name etc) in Delphi”

Conditional compilatation to detect VCL or FireMonkey in a Delphi Form

This shows how to detect if your application is using FireMonkey (FMX) or VCL when using conditional compilation in a Delphi form

{$IF FMX.Types.FireMonkeyVersion >= 0} // if FireMonkey
     DoSomethingFMX;
{$ELSE}                  // its not FMX, so it must be VCL
     DoSomethingVCL;
{$ENDIF}

Continue reading “Conditional compilatation to detect VCL or FireMonkey in a Delphi Form”

List of Delphi controls on a form – Tree hierarchy and flat list (FireMonkey)

Get a list of all controls in your Delphi FireMonkey (FMX) form .

Examples included a flat list and a hierarchical “tree” list

Continue reading “List of Delphi controls on a form – Tree hierarchy and flat list (FireMonkey)”