Update 4 has unfortunately two major FireMonkey issues. The first is that text now appears all fuzzy when the GDI+ backend is used. The second, and the one I will concentrate on here, is that it indiscriminately removes the ability to parent sub-controls to various other control types at design time. This is because
has been added to the end of many a constructor. This is the equivalent of removing csAcceptsControls from the ControlStyle set property of a VCL TWinControl descendant. However, it usually makes little sense in a FMX context given any FMX control is inherently nestable with any other – complex controls are composed of less complex controls, which are themselves composed of ‘shapes’ (controls that are not styled because they *are* the style). As a result, the FMX TSpeedButton, for example, doesn’t have a Bitmap or Glyph property, or the FMX TStatusBar a Panels property. Rather, the idea is that you can just add a TImage or TLabel to either yourself… or at least you could, before update 4 artificially disabled this functionality.
If nothing else, the new restrictions make it is
impossible difficult [see update below – another bug saves the day!] to replicate the ControlsDemo sample project. If you open it up, you will see the following-
- The ‘Additonal’ tab demonstrating a TLabel and TImage being nested on a TButton:
- The ‘TreeView and ListBox’ tab illustrating how flexible the FMX TListBox is by nesting a whole range of controls on individual list items (and not in a stupid way I should add):
- A TStatusBar down the bottom with various controls parented to it:
Initially coming across this issue with respect to list boxes, I reported it to QC (link), upon which the report type was soon changed to ‘feature specification issue’ and the severity to ‘extreme corner issue’ – the changer did not identify themselves, and didn’t actually open the report either. After putting it back, I then received a not completely clueless (dare I say even reasonable?) response from everyone’s favourite QC guy, so that’s some sort of progress. While he has downgraded both the report type and the severity once again, they haven’t been downgraded to the frankly insulting level they were downgraded to before. The main problem isn’t QC though – it’s the fact the people working on FMX are managing to make it worse compared to what what it was like back in September.
Update: the structure pane (top left of the IDE by default) ignores an FMX control’s AcceptsControls property, as exposed by the IControl interface. This is surely a bug (after all, it doesn’t ignore csAcceptsControls in a VCL context), but at least it enables a workaround – add the intended sub-controls to the form, then drag them onto their proper parent in the structure pane. In the case of TStatusBar this possibility is just as well, since without it, update 4 would have rendered that particular control completely useless, since there is no other way to add text to a FMX status bar but via nested TLabel or TText controls.