set focus on Tkx treeview node

Posted by bobl on 2016-04-18 11:53

$gLast_id="root";
$gLast_id=$tree->insert("", "end", -id => $gLast_id, -text => "root");
$tree->item($gLast_id, -open => "true");
$tree->focus($gLast_id);

What is the correct way to focus on the node just created and made visible?
Thank you in anticipation