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.
范例
基本范例 (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]相关指南
文本
Wolfram Research (2007),InvokeMethod,Wolfram 语言函数,https://reference.wolfram.com/language/GUIKit/ref/InvokeMethod.html.
CMS
Wolfram 语言. 2007. "InvokeMethod." Wolfram 语言与系统参考资料中心. Wolfram Research. https://reference.wolfram.com/language/GUIKit/ref/InvokeMethod.html.
APA
Wolfram 语言. (2007). InvokeMethod. Wolfram 语言与系统参考资料中心. 追溯自 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: 17-August-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: 17-August-2026]}