InvokeMethod[name,{}|content]
calls a widget method on the wrapping contexted widget.
InvokeMethod[{target,name},content]
calls a widget method on the specified target widget.
InvokeMethod
InvokeMethod[name,{}|content]
calls a widget method on the wrapping contexted widget.
InvokeMethod[{target,name},content]
calls a widget method on the specified target widget.
Details and Options
Examples
Basic Examples (1)
Needs["GUIKit`"]Run a simple widget definition:
ref = GUIRun[Widget["Frame", Name -> "myFrame"]]Invoke a method that returns the x coordinate:
ref@InvokeMethod[{"myFrame", "getX"}]GUIScreenShot[ref]Specify arguments to a method call that changes the size of the frame:
ref@InvokeMethod[{"myFrame", "setSize"}, 100, 100]GUIScreenShot[ref]Related Guides
Text
Wolfram Research (2007), InvokeMethod, Wolfram Language function, https://reference.wolfram.com/language/GUIKit/ref/InvokeMethod.html.
CMS
Wolfram Language. 2007. "InvokeMethod." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/GUIKit/ref/InvokeMethod.html.
APA
Wolfram Language. (2007). InvokeMethod. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/GUIKit/ref/InvokeMethod.html
BibTeX
@misc{reference.wolfram_2026_invokemethod, author="Wolfram Research", title="{InvokeMethod}", year="2007", howpublished="\url{https://reference.wolfram.com/language/GUIKit/ref/InvokeMethod.html}", note=[Accessed: 15-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_invokemethod, organization={Wolfram Research}, title={InvokeMethod}, year={2007}, url={https://reference.wolfram.com/language/GUIKit/ref/InvokeMethod.html}, note=[Accessed: 15-June-2026]}