Register a callback function associated with a given key, for clicks on buttons and labels in the flyout. For instance, a button specified by the XML should be matched by a call to registerButtonCallback("CREATE_VARIABLE", yourCallbackFunction).
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-09-18 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eregisterButtonCallback\u003c/code\u003e method enables associating custom functions with buttons and labels in the flyout of a Blockly workspace.\u003c/p\u003e\n"],["\u003cp\u003eThis method uses a key to identify the button/label and link it to a specific callback function triggered when the element is clicked.\u003c/p\u003e\n"],["\u003cp\u003eThe callback function receives a \u003ccode\u003eFlyoutButton\u003c/code\u003e object as an argument providing details about the clicked button.\u003c/p\u003e\n"]]],[],null,["[blockly](./blockly.md) \\\u003e [WorkspaceSvg](./blockly.workspacesvg_class.md) \\\u003e [registerButtonCallback](./blockly.workspacesvg_class.registerbuttoncallback_1_method.md)\n\nWorkspaceSvg.registerButtonCallback() method\n--------------------------------------------\n\nRegister a callback function associated with a given key, for clicks on buttons and labels in the flyout. For instance, a button specified by the XML should be matched by a call to registerButtonCallback(\"CREATE_VARIABLE\", yourCallbackFunction).\n\n**Signature:** \n\n registerButtonCallback(key: string, func: (p1: FlyoutButton) =\u003e void): void;\n\nParameters\n----------\n\n| Parameter | Type | Description |\n|-----------|----------------------------------------------------------------|--------------------------------------------------------|\n| key | string | The name to use to look up this function. |\n| func | (p1: [FlyoutButton](./blockly.flyoutbutton_class.md)) =\\\u003e void | The function to call when the given button is clicked. |\n\n**Returns:**\n\nvoid"]]