in GUI Development by

What's the best way to RemoveAll() views from a Core::Group in 9.30?


I have the following in an UpdateViewState{} but it's retaining the views in RecMarkerGroup each time its executed.


var Core::Group RecMarkerGroup = new Core::Group;

RecMarkerGroup.Add(myview, 0);



1 Answer

0 votes

Hello Mike,

since the method RemoveAll() is not available in versions <= 9.30, you can implement following code to achieve the same effect:

// Get the first view existing within some GUI component (group)
var Core::Group group = ...; /* e.g. 'this' */
var Core::View  view  = group.FindNextView( null, Core::ViewState[]);

// Repeat as long as there are views to remove
while ( view != null )
  group.Remove( view );
  view = group.FindNextView( null, Core::ViewState[]);

See also: Enumerate and search views existing within the component.

Best regards

Paul Banach

Ask Embedded Wizard

Welcome to the question and answer site for Embedded Wizard users and UI developers.

Ask your question and receive answers from the Embedded Wizard support team or from other members of the community!

Embedded Wizard Website | Privacy Policy | Imprint