From the documentation:
[quote]The following Action event changes it to a downward pointing triangle:
Me.Value = True[/quote]
Except you’ll get a StackOverflow error.
And yes, that is the complete code in the project.
Tested on MacOS X 10.13.6 with Xojo 2018 R3 for both 32bit and 64bit.
Can anyone confirm before I file a bug report.
My guess is that the documentation is wrong. If you don’t put any code on the Action event, the triangle change to downward and right facing on it’s own, effectively changing the .Value from False to True on first click and back on the next click, so no need to put Me.Value = True on the DisclosureTriangle Action event.
Putting the Me.Value = True on the Action event create a StackOverflow error, this should not happen.
Maybe a better example for Value and Action event would be:
The next code will change the Text in Label1 depending if the DisclosureTriangle is downward (True) or facing right/left (False)
if Me.Value then
Label1.Text = "True"
Label1.Text = "False"
Markus, I’m thinking that DisclosureTriangle behavior is comparable to CheckBox, Action event change the boolean from True to False and back.
If I put a CheckBox and in Action event I put Me.Value = True, it doesn’t crash and I can’t remove the checkmark (always True).
I could expect the same behavior with DisclosureTriangle, always pointing downward and never get StackOverflow.
Don’t you think?