Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How can I cut/copy/paste TreeStore rows using clipboard?

0
Posted

How can I cut/copy/paste TreeStore rows using clipboard?

0

The clipboard accepts text or image data, not an arbitrary object. The trick is to create a text representation of selected tree rows and copy it into clipboard. When pasting, create tree rows based on the text obtained from clipboard. Ideal format for this is XML, as a side effect the same serialization/deserialization method can be used when saving/loading the tree contents to/from a file. The XML tree should contain at least a root XML tag with format description and cell XML tags for each tree row. If the tree model contains columns with short values like checkboxes, put these values directly ito cell XML tags as parameters. If your model contains columns with potentially long text, you can add a special data XML tag as a child of every cell XML tag.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123