SetWidgetReference[name,value]
registers a widget with string name in the widget registry for the current interface.
SetWidgetReference
SetWidgetReference[name,value]
registers a widget with string name in the widget registry for the current interface.
范例
基本范例 (1)
Needs["GUIKit`"]ref = GUIRun[
Widget["Panel", {
Widget["Label", {"text" -> "Hello World!"}, Name -> "myLabel"]
} ]
]WidgetReference allows you to use a name to access the underlying object:
obj = ref @ WidgetReference["myLabel"]You can use this object to create a new reference to the widget:
ref@SetWidgetReference["myLabel1", obj]Now there are two names, and both reference the same widget:
"WidgetNames" /. GUIInformation[ref]技术笔记
相关指南
文本
Wolfram Research (2007),SetWidgetReference,Wolfram 语言函数,https://reference.wolfram.com/language/GUIKit/ref/SetWidgetReference.html.
CMS
Wolfram 语言. 2007. "SetWidgetReference." Wolfram 语言与系统参考资料中心. Wolfram Research. https://reference.wolfram.com/language/GUIKit/ref/SetWidgetReference.html.
APA
Wolfram 语言. (2007). SetWidgetReference. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/GUIKit/ref/SetWidgetReference.html 年
BibTeX
@misc{reference.wolfram_2026_setwidgetreference, author="Wolfram Research", title="{SetWidgetReference}", year="2007", howpublished="\url{https://reference.wolfram.com/language/GUIKit/ref/SetWidgetReference.html}", note=[Accessed: 11-August-2026]}
BibLaTeX
@online{reference.wolfram_2026_setwidgetreference, organization={Wolfram Research}, title={SetWidgetReference}, year={2007}, url={https://reference.wolfram.com/language/GUIKit/ref/SetWidgetReference.html}, note=[Accessed: 11-August-2026]}