void __clickExpandButton(EventContext context)
{
GButton expandButton = (GButton)context.sender;
TreeNode node = (TreeNode)expandButton.parent.data;
if (list.scrollPane != null)
{
float posY = list.scrollPane.posY;
if (expandButton.selected)
node.expanded = true;
else
node.expanded = false;
list.scrollPane.posY = posY;
list.scrollPane.ScrollToView(node.cell);
}
else
{
if (expandButton.selected)
node.expanded = true;
else
node.expanded = false;
}
}