252 views
in GUI Development by

Hello, 

I have a question, I use an outline box and fill it with pushbuttons. 
The filling follows when I switch to the page.

Now the problem is, when I click again on the site it adds the existing pushbutton with the new pushbutton 
Means: 2 existing pushbuttons which are already present in the outline are added with 2 more = 4

We have already tried it with "FindSiblingView" unfortunately also without success

Is there somehow a way to completely delete the content of the outline box before I reload the content (The content is variable )

in the lower area you will find a few photos I hope it is understandable what I mean :-) 

Thanks in advance, I hope you can help me how I could do this best. 

Cheers 
Simon 

Here the OutlineBox is filled and passed on to the Application OutlineList


 

Creating the pushbutton in the OutlineBox. 

When you click again on the page it jumps to the RemoveItemes 

We have tried to delete the content with the FindSiblingView but without success. 

1 Answer

0 votes
by

Hi Simon,

I think (without trying it or without debugging your application) that FindSiblingView( this, ... ) will return null, because you are searching for a sibling view of the Outline box instead of an embedded View.

Try the following:

/* search for the first embedded view of the outline box */
var Core::View view = Outline.FindNextView( null, Core::ViewState[ Embedded ] );
while ( view != null )
{
  /* make sure that it is a button and remove it */
  if ((Application::ErrorItemsButton)view != null )
    Remove( view );

  /* search again for the first embedded view */
  view = Outline.FindNextView( null, Core::ViewState[ Embedded ] );
}

Does it work?

Best regards,

Manfred.

 

by
Hi Manfred,

It works greate , thank you very mutch for you help

Cheers
Simon

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

...