I'm trying to work with the TdxTileControl. It looks useful, expecially for tablet deployment,but it appears to be buggy and unstable, on my system anyway. Problems include "A Call to an OS Function Failed", Access Violations and dependent forms going blank in the IDE, and Delphi crashing. Things become particularly unstable after deleting a TdxTileControlItem.
Example project attached. It includes 5 forms: Form1 is themain form and contains the TileControl. Forms 2-5 are called by Form1. Forms 2,3 and 4 are attached as DetailOptions.DetailControls to dxTileControlItems onthe main form. Form 5 is opened independently using runtime code.
Form2 has BorderStyle bsSizeable and Position poDefaultPosOnly.
Form3 has BorderStyle bsNone and Position poMainFormCenter.
Form4 has BorderStyle bsSingle and Position poScreenCenter.
Form5 has BorderStyle bsSizeable and Position poDefaultPosOnly.
Note that I don't autocreate forms 2-5 but create them when needed at runtime. Most of the errors noted below also happen when the dependent forms are autocreated, however.
Further details are in "ReadMe.txt" in the attachment.
As things stand, I can't continue working with this component. Any suggestions?
The point is that the Tile Control is not supposed to work with forms as detail controls because it is unsafe in VCL to place forms into other controls. It uses frames (TFrame) instead. I suggest that you examine one of our Tile Control demos (e.g., Realtor World) to see how a detail control can be created and assigned at runtime. In particular, the following code pattern is the key to implement this behavior:
procedure TmainForm.TileItemActivateDetail(Sender: TdxTileControlItem); begin if Sender.DetailOptions.DetailControl = nil then Sender.DetailOptions.DetailControl := TMyFrame.Create(Self);
Please try this approach on your side and let me know the result.