How to trigger label callback on enter/return but not on focus change?
-
@rglides said in How to trigger label callback on enter/return but not on focus change?:
Enter is for the setConsumedKeyPresses right?
Not unless you define it. Your if statement is currently the equivalent of
if (key == undefined ...
-
@rglides Ha! yeah, I changed it to if (Label1.get("editable")) and it works, ok little lesson learned. Still, this works, almost
-
@rglides said in How to trigger label callback on enter/return but not on focus change?:
if (Label1.get("editable")
The label is always editable isn't it?
-
@d-healey Sure, but for some reason it has allowed clicking outside of the label and not triggering the callback
-
@rglides said in How to trigger label callback on enter/return but not on focus change?:
@d-healey Sure, but for some reason it has allowed clicking outside of the label and not triggering the callback
It's still triggering it here. Add
Console.print("test");
inside the if statement, you can remove all the update panels stuff, it's just complicating the picture. -
@rglides uggggh, ok, HISE has defeated me yet again, my logic was to start with an if statement to see if the callback could be avoided, so I thought I had it. Turns out the callback just won't trigger at all regardless of the if statement, until the label is re-interacted with (or when hitting enter) so I have proved useless again. But I tried, and it was fun to feel like I figured something out, briefly
-
@rglides said in How to trigger label callback on enter/return but not on focus change?:
I tried, and it was fun to feel like I figured something out, briefly
You've done no worse than my attempt :)
-
@d-healey Thank you. This really should just be a core feature, it seems like basic stuff
-
-
@Chazrox fr