To register local look and feel for panels, do I use "drawPanel"?
-
I don't see a list anywhere of the inputs available for "function name".
ScriptLookAndFeel.registerFunction(var functionName, var function)
Do I use "drawPanel" when making custom look and feel for a panel?
-
@VirtualVirgin no, just use .setPaintRoutine
The methods are all the same but you don't get an obj, instead you can refer to the panel with
this
-
@aaronventure said in To register local look and feel for panels, do I use "drawPanel"?:
@VirtualVirgin no, just use .setPaintRoutine
The methods are all the same but you don't get an obj, instead you can refer to the panel with
this
Thanks. I was using a paint routine to prototype, but I'm trying to get the benefit of LAF to be able to assign the function to many panels.
I tried this:
// Local LAF for diagonal text labels const diagonalText = Content.createLocalLookAndFeel(); diagonalText.setPaintRoutine(function(g) { (paint routine stuff) });
... but the console tells me:
"function not found"Is there a way to word it or set it up to use as an LAF or like an LAF?
-
@VirtualVirgin said in To register local look and feel for panels, do I use "drawPanel"?:
Is there a way to word it or set it up to use as an LAF or like an LAF?
You can assign a single paint routine function to many panels. I have a few videos about paint routines, this one in particular will help in this situation - https://youtu.be/jO-KOEcJRKo?si=QwdbZVcFtVhuXA3p
-
@VirtualVirgin define an inline function with a g argument, write it and then just pass the function into the setPaintRoutine method call for any panel you want to use it for.