GUIKIT PACKAGE
{}

"TextPanel"

Widget["TextPanel"]
represents a text panel.

DetailsDetails

  • To use Widget["TextPanel"], you first need to load GUIKit using Needs["GUIKit`"].
  • Typically used to display HTML or RTF styled content.
  • There are three default text widgets provided within GUIKit: Widget["TextField"], Widget["TextArea"], and Widget["TextPanel"]. Widget["TextField"] is typically used for single line input using a single font, while Widget["TextArea"] would typically be used to display or take multiple line input also in a single font style. Widget["TextPanel"] is used less often, but has the benefit of displaying stylized text either as plain text, HTML 3.2 compliant text, or RTF styled text.
  • In its most basic form, Widget["TextPanel"] can display plain text just as Widget["TextArea"].
  • This widget would typically be useful to simplify laying out slightly more complicated text blocks using a single text string but including style information. You can also take advantage of the property by specifying an external source for the text content, either as a relative local file or even URL-based paths. You can also support eventing off hyperlinks in any HTML you provide in the text, allowing for custom hyperlink actions or forwarding standard web URLs to a Wolfram Language front end to open in the users chosen web browser.
  • The following properties are available:
  • "text"""the text content
    "path"Nullpath or URL of the text content
    "contentType""text/plain" content type
    "editable"Truewhether the text panel can be edited
  • The property can take the values , , , and .
  • The following event is available:
  • "hyperlinkUpdate"the event triggered whenever a hyperlink in the text is activated
  • The event is only fired when the panel is not editable.

ExamplesExamplesopen allclose all

Basic Examples  (1)Basic Examples  (1)

In[1]:=
Click for copyable input

Display a text panel with content:

In[2]:=
Click for copyable input
In[3]:=
Click for copyable input
Out[3]=

Display stylized text using HTML and set the property:

In[4]:=
Click for copyable input
In[5]:=
Click for copyable input
Out[5]=

Use RTF instead of HTML:

In[6]:=
Click for copyable input
In[7]:=
Click for copyable input
Out[7]=

Use an external text source:

In[8]:=
Click for copyable input
In[9]:=
Click for copyable input
Out[9]=