10-01-2019 03:28 PM
There must be an easy way to do this, but I cannot find the answer.
Assume I have a Tree Control that needs a horizontal scroll bar, ie, it is not expanded such that you can see all columns. See Below:
When the program start ups, the tree is EMPTY and the top left cell is not 0,0. I want to set the top left cell to 0,0, but I can not as the Top Left Visible Cell Property returns an error if the tree is empty. (This is expected behavior according to help)
Thanks
mcduff
Solved! Go to Solution.
10-01-2019 03:52 PM
Use a Key Focus True, Edit Position (0,0), Key Focus False all in the same property node. It seems like a hack but it does work.
10-01-2019 04:09 PM
@aputman wrote:
Use a Key Focus True, Edit Position (0,0), Key Focus False all in the same property node. It seems like a hack but it does work.
Thanks!!
It is a much better hack than mine! I inserted an empty item into the tree, set the Left Corner Position, then erased the tree.
Cheers,
mcduff
08-28-2020 05:48 AM
I can confirm that in normal running vi the KeyFocus trick works.
Seems however there's a caveat with it.
If you're running your tree control instance in a vi that runs in a subpanel, it fails to do anything.
There is no error either, it just doesn't do anything.
Add item - set visible item - remove item cycle seems like the only way here.