11
votes

Just installed Delphi xe7. Opened a project developed with XE7. Side note, but my first concern is that everything causes the IDE to hang, whether it be changing 'views' from Master to iPhone4, or simply dragging controls around in Design View. I previously had a tools unit that had a function that accepted a TComboEdit param. It seems they moved things around again because the function is now broken. To quickly find out which unit hosts combo edits, I opened a form and dropped a Combo edit down and saved. Cool, now I know there is a FMX.ComboEdit unit. I try to delete the combo edit and this is what I get : Selection contains a component, ComboEdit1, introduced in an ancestor and can not be deleted.

This is also true for any new control I drop on the form, e.g., even TEdits. Can't delete anything. Quick google search makes references to TGrids and columns... On my form, there are only Layouts and a TabControl, where the newly places controls are within a TabItem. Okay, maybe there is a similar bug with the TabItems, so I attempted moving the controls around, making the form their parent. But, the IDE hangs for about 30 seconds and won't do anything.

How can I delete these controls in Delphi xe7?

1
Okay... Changed 'view' from iPhone4", back to Master and now I can delete the controls. Question still remains as to why I can not delete controls from different views ( bug maybe? ). Will leave up question to avoid the 5 min headache I got for other people on the verge of uninstalling Xe7.ThisGuy
Although I haven't installed XE7, I suppose that the new MulitViews are simply a fancy name for Visual Form Inheritance. And in those it is by design that you cannot remove controls that were introduced in an ancestor form. You could only hide them in inherited forms.iamjoosy
Okay, 1+ that makes sense.ThisGuy
You might want to start with SIMPLE examples that don't involve inheritance. I think the error message you got was actually pretty self explanatory.Warren P
@Uwe, well meanwhile I installed XE7 and I think it behaves slightly different than usual Visual Form Inheritance. E.g. controls added to inherited Views get propagated back to the Master Form which is a) differnt than standard Visual Form Inheritance and b) Leads to not being able to delete this control in the inherited view. Somewhat counter intuitive IMOiamjoosy

1 Answers

12
votes

In order to delete components in a View you need to switch to the Master View and delete the components there. Note also, that components that you add to a specific view can only be deleted in the Master View. The reason for this is that all components that are dropped on any view are propagated to the Master View and then by virtue of a sort of Visual Form Inheritance will show up on all Views.