Dragging from TreeView to LinkBoxGui

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

On 08/11/2004 at 07:50, xxxxxxxx wrote:

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

---------
Hello,
i have in my Dialog a TreeView and a DescriptionCustomGUI. In some cases i need to drag an element (ObjectData) from the TreeView to a LinkBoxGui in the DescriptionCustomGUI.

While dragging over the linkbox, the dragged element is shown in the linkbox (like accepting the object). But after releasing the mouse, the link box leaves empty.

I start the dragging in the TreeView in GenerateDragArray, where i add my object directly to the AtomArray.

The DescriptionCustomGUI was created with DESCRIPTION_OBJECTSNOTINDOC and the dragged object is not in a document. May this cause the problem?

How is the SetLink() for a LinkBoxGui done manually? Can i assign my object (ObjectData* myobjectdata) directly to the LinkBoxGui, like:
mybasecontainer->SetLink(LINKBOX_ID, myobjectdata);

Torsten

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

On 10/11/2004 at 02:54, xxxxxxxx wrote:

Hmm, yes I guess this would be a problem. BaseLinks are made for objects that belong to a document. The criterion for having your link show up in the link GUI is that GetLink(GetActiveDocument()) doesn't return NULL.

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

On 10/11/2004 at 08:19, xxxxxxxx wrote:

OK, will it work if a create a BaseDocument with Alloc, insert my objects to this document, but will not insert the document to C4D?

If not, then i have to do my job with a kind of combobox. But i can't find any example, how to add items to an existing, empty CYCLE.

mycontainer.res:
...
LONG ACTIVEOBJECTINDEX
{
    CYCLE
    {
    }
}
...

How to add and remove items dynamically? And how to read the selected item?
Thank you for your help.

Torsten

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

On 01/05/2005 at 04:27, xxxxxxxx wrote:

Hi All,
If i add to my description *.res file for the AM : (NOT in a dialog)
.
.
LINKBOX      MY_ID   { CUSTOMGUI_LINKBOX ; }
.
.
C4D comes with a "Error reading resource" message.
What is it that i do wrong?
Thanks

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

On 01/05/2005 at 08:25, xxxxxxxx wrote:

It's not LINKBOX, it's LINK - check the SDK documentation under "Description resource" for details. :)

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

On 01/05/2005 at 11:57, xxxxxxxx wrote:

Ah thank you robert, got it working.