Wireshark-dev: [Wireshark-dev] Re: How to add item on top of tree

From: Pablo MG <pmartin-gomez@xxxxxxxxxx>
Date: Sat, 19 Jul 2025 00:19:25 +0200
Le 18/07/2025 à 22:33, John Thacker a écrit :
You can get the first child and call `proto_tree_move_item()` twice - once to move your new item immediately behind the first child, and then again, switching the order of the two proto_item parameters in the function so that the first child is moved behind the new item.

Cheers,
John

Hello,

It's not the prettiest thing I've seen but it's definitely a clever one that work! Thanks! Posted the MR https://gitlab.com/wireshark/wireshark/-/merge_requests/20597

Best regards,

Pablo MG