<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Possible to automatically highlight a substring within a text edit box? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Possible-to-automatically-highlight-a-substring-within-a-text/m-p/486800#M73064</link>
    <description>&lt;P&gt;Textboxes can use a simple markup for bold, italic and underlining.&amp;nbsp; Look in the scripting index at text boxes, for markup.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
example_text = 
"This is &amp;lt;b&amp;gt;bold&amp;lt;/b&amp;gt; text. This is &amp;lt;i&amp;gt;italic&amp;lt;/i&amp;gt; text. This is &amp;lt;u&amp;gt;underlined&amp;lt;/u&amp;gt; text. 
This is &amp;lt;b&amp;gt;&amp;lt;i&amp;gt;&amp;lt;u&amp;gt;bold, italic, underlined&amp;lt;/u&amp;gt;&amp;lt;/i&amp;gt;&amp;lt;/b&amp;gt; text.";
win = New Window( "Example", tb = Text Box( example_text ) );
tb &amp;lt;&amp;lt; markup;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="pmroz_0-1652463998246.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/42431iCB57A90556CFAADC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="pmroz_0-1652463998246.png" alt="pmroz_0-1652463998246.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 13 May 2022 17:46:47 GMT</pubDate>
    <dc:creator>pmroz</dc:creator>
    <dc:date>2022-05-13T17:46:47Z</dc:date>
    <item>
      <title>Possible to automatically highlight a substring within a text edit box?</title>
      <link>https://community.jmp.com/t5/Discussions/Possible-to-automatically-highlight-a-substring-within-a-text/m-p/486777#M73063</link>
      <description>&lt;P&gt;Hi. &amp;nbsp;I'm wondering if anyone knows of a method where my script can automatically highlight a substring within a text edit box? &amp;nbsp;I'd like the user to be able to&lt;/P&gt;&lt;P&gt;1. Click on the text within the TEB at a specific location.&lt;/P&gt;&lt;P&gt;2. A "&amp;lt;&amp;lt; Set Text Changed" function would return the location of the cursor in the text field using a yet-to-be-determined command.&lt;/P&gt;&lt;P&gt;3. The script looks around the cursor location for predefined delimiters in the text.&lt;/P&gt;&lt;P&gt;4. Finally it highlights the text between the delimiters.&lt;/P&gt;&lt;P&gt;I briefly explored using a MouseBox wrapper, but at first blush there doesn't appear to be any easy way for JMP to associate mouse position with the underlying text. &amp;nbsp;Plus, even if I could figure that out, there doesn't appear to be any way to have JMP highlight substrings within a text edit box (none that I could find at least). &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Perhaps there's another type of display box I could employ to do this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;JMP Pro 16.2&lt;/P&gt;&lt;P&gt;macOS Big Sur 11.6.5&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help is appreciated. &amp;nbsp;Thanks.&lt;/P&gt;</description>
      <pubDate>Sun, 11 Jun 2023 11:24:19 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Possible-to-automatically-highlight-a-substring-within-a-text/m-p/486777#M73063</guid>
      <dc:creator>nikles</dc:creator>
      <dc:date>2023-06-11T11:24:19Z</dc:date>
    </item>
    <item>
      <title>Re: Possible to automatically highlight a substring within a text edit box?</title>
      <link>https://community.jmp.com/t5/Discussions/Possible-to-automatically-highlight-a-substring-within-a-text/m-p/486800#M73064</link>
      <description>&lt;P&gt;Textboxes can use a simple markup for bold, italic and underlining.&amp;nbsp; Look in the scripting index at text boxes, for markup.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
example_text = 
"This is &amp;lt;b&amp;gt;bold&amp;lt;/b&amp;gt; text. This is &amp;lt;i&amp;gt;italic&amp;lt;/i&amp;gt; text. This is &amp;lt;u&amp;gt;underlined&amp;lt;/u&amp;gt; text. 
This is &amp;lt;b&amp;gt;&amp;lt;i&amp;gt;&amp;lt;u&amp;gt;bold, italic, underlined&amp;lt;/u&amp;gt;&amp;lt;/i&amp;gt;&amp;lt;/b&amp;gt; text.";
win = New Window( "Example", tb = Text Box( example_text ) );
tb &amp;lt;&amp;lt; markup;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="pmroz_0-1652463998246.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/42431iCB57A90556CFAADC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="pmroz_0-1652463998246.png" alt="pmroz_0-1652463998246.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 May 2022 17:46:47 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Possible-to-automatically-highlight-a-substring-within-a-text/m-p/486800#M73064</guid>
      <dc:creator>pmroz</dc:creator>
      <dc:date>2022-05-13T17:46:47Z</dc:date>
    </item>
    <item>
      <title>Re: Possible to automatically highlight a substring within a text edit box?</title>
      <link>https://community.jmp.com/t5/Discussions/Possible-to-automatically-highlight-a-substring-within-a-text/m-p/486840#M73066</link>
      <description>&lt;P&gt;I'm aware of this feature, but text boxes do not allow the user to manually select the text within them, nor do they have any way to execute a function when clicking on them. &amp;nbsp;I'm looking for something where the user can click on, say, a single word in the text string, and a function will automatically select the entire word.&lt;/P&gt;</description>
      <pubDate>Fri, 13 May 2022 19:42:55 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Possible-to-automatically-highlight-a-substring-within-a-text/m-p/486840#M73066</guid>
      <dc:creator>nikles</dc:creator>
      <dc:date>2022-05-13T19:42:55Z</dc:date>
    </item>
    <item>
      <title>Re: Possible to automatically highlight a substring within a text edit box?</title>
      <link>https://community.jmp.com/t5/Discussions/Possible-to-automatically-highlight-a-substring-within-a-text/m-p/487104#M73091</link>
      <description>&lt;P&gt;You can use a &lt;STRONG&gt;text edit box&lt;/STRONG&gt; to allow users to click on the text.&amp;nbsp; If you double-click on a word the entire word will be selected.&lt;/P&gt;</description>
      <pubDate>Mon, 16 May 2022 12:46:21 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Possible-to-automatically-highlight-a-substring-within-a-text/m-p/487104#M73091</guid>
      <dc:creator>pmroz</dc:creator>
      <dc:date>2022-05-16T12:46:21Z</dc:date>
    </item>
  </channel>
</rss>

