You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<h1>wtext<aclass="headerlink" href="#wtext" title="Permalink to this heading">¶</a></h1>
<p>The wtext object (widget text) is often used together with widgets such as sliders. It provides a way to modify dynamically a portion of the title or caption of a canvas, perhaps in response to user interactions or computed changes.</p>
<p>The example program <aclass="reference external" href="https://www.glowscript.org/#/user/GlowScriptDemos/folder/Examples/program/ButtonsSlidersMenus-VPython">ButtonsMenusSliders</a> uses <strong>wtext</strong> to display the current rotation speed of a cube whose rotation is controlled by a slider.</p>
<p>Variables must be converted to a string using standard Python formatting options. Text may be updated any time by setting the <em>text</em> attribute of the <em>wtext</em> object:</p>