What is Delphi's equivalent to "+=" for adding elements to a set?

Viewed 8236

In other languages like C++, there are operators to do a plus-equals or or-equals type of operation to add additional styles/flags. Is there an equivalent in Delphi?

Right now I have some code like:

label1.Font.Style := label1.Font.Style + [fsBold];
label2.Font.Style := label2.Font.Style + [fsBold];

But I would love, if it is possible, to get that simplified a bit to something more concise without duplicating the label name on both sides of the assignment operator, something along the lines of: label1.Font.Style += [fsBold]; or label1.Font.Style := self + [fsBold];

Can this be done? Or not so much?

4 Answers
Related