Dialog Remove Items and refresh

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 12/07/2004 at 15:49, xxxxxxxx wrote:

User Information:
Cinema 4D Version:   8.500 
Platform:   Windows  ;   
Language(s) :     C++  ;

---------
Hi!

I have a Dialog where I put some Items in on demand (textfields etc.)
When this is done I call

BaseContainer msg;
msg.SetId(BFM_LAYOUT_CHANGED);
SendParentMesssage(msg);

This works fine and updates the dialog layout when calling it. BUT!

When I want to remove these Elements by using RemoveElement() and then sending the Message to Parent this does NOT work - the Items are unavailable BUT the areas where thay are are not redrawn.

Why? Does anyone of you hava an idea or better solution?

Thank you,

lawn

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 12/07/2004 at 17:15, xxxxxxxx wrote:

There is a better way, I think. See the AsyncTest.cpp file for how it handles dynamic (changing) groups. Then you can use this gem:

  
void AsyncDialog::ReLayout(void)  
{  
     LayoutFlushGroup(GROUP_DYNAMIC);  
     CreateDynamicGroup();  
     LayoutChanged(GROUP_DYNAMIC);  
}  

Now, this requires you to 'reconstruct', through your own CreateDynamicGroup() method, but it's fast enough to handle quite a large number of elements.

HTH,
Robert