<?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: How to modify font size of text inside combo box? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-to-modify-font-size-of-text-inside-combo-box/m-p/273378#M53174</link>
    <description>&lt;P&gt;or ...&amp;nbsp;&lt;/P&gt;
&lt;P&gt;replace the combo box with a text box.&amp;nbsp; Use the text box to show the name of the selected parameter (using a small font).&amp;nbsp; Next to it, have a "select" button.&amp;nbsp; Use the button script to launch a new window containing the combo box or list box with the parameter names.&amp;nbsp; Since it is a separate window with no other content you should be able to display the full length names without any problem); make this window modal and update the text box when the window is closed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is some crude code to illustrate the idea:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;names default to here(1);

NewWindow("Test",
	BorderBox(top(20),bottom(20),left(20),right(20),
		VListBox(
			TextBox("Selected Parameter",&amp;lt;&amp;lt;setFontStyle("Bold")),
			HListBox(
				here:tb = TextEditBox("parameter name 1",&amp;lt;&amp;lt;enable(0),&amp;lt;&amp;lt;setWidth(130)),
				SpacerBox(size(6,0)),
				ButtonBox("select",
					NewWindow("Select",&amp;lt;&amp;lt;modal,
						&amp;lt;&amp;lt;onCLose(
							here:tb&amp;lt;&amp;lt;setText(cb&amp;lt;&amp;lt;getSelected)
						),
						BorderBox(top(20),bottom(20),left(20),right(20),
							cb = ComboBox({"parameter name 1","parameter name 2"})
						)
					),
					underlinestyle(1)
				)
			)
		)
	)
)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 17 Jun 2020 23:49:29 GMT</pubDate>
    <dc:creator>David_Burnham</dc:creator>
    <dc:date>2020-06-17T23:49:29Z</dc:date>
    <item>
      <title>How to modify font size of text inside combo box?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-modify-font-size-of-text-inside-combo-box/m-p/273346#M53168</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was wondering if there was a way to adjust the font size of the text inside a combo box? I've got a list of test parameters inside a combo box for a user to select from, but some of the parameter names are pretty lengthy so I'd like to reduce the font size to try and save space on the screen.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 23:29:29 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-modify-font-size-of-text-inside-combo-box/m-p/273346#M53168</guid>
      <dc:creator>James_Hark</dc:creator>
      <dc:date>2023-06-09T23:29:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to modify font size of text inside combo box?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-modify-font-size-of-text-inside-combo-box/m-p/273360#M53169</link>
      <description>I do not find any messages that can be passed to a Combo Box() to set the font size.  Therefore I assume that it is following the size of one of the font categories in the Preferences.  I did an incomplete search of the Fonts in Preferences, but did not find one that reset the font size for the Combo Box().</description>
      <pubDate>Wed, 17 Jun 2020 20:57:03 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-modify-font-size-of-text-inside-combo-box/m-p/273360#M53169</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2020-06-17T20:57:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to modify font size of text inside combo box?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-modify-font-size-of-text-inside-combo-box/m-p/273373#M53171</link>
      <description>&lt;P&gt;I don't think you have the ability to change the font on a combo box.&amp;nbsp; Perhaps you could implement some logic to shorten the names?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;// example 1

str = "this is a long parameter name";
if (length(str)&amp;gt;15,
	newstr = left(str,5) || "..." || right(str,5)
);
// newstr = "this ... name"

// example 2

abbreviatedFilePath = function({path},{default local},
    delim = "/";
    If (contains(path,"\"),
        delim = "\"
    );
    lstWords = words(path,delim);
    nwords = nItems(lstWords);
    If (nWords&amp;gt;2,
        abbrPath = "..." || delim || lstWords[nwords-1] || delim || lstWords[nwords]
    ,
        abbrPath = path
    );
    return(abbrPath);
);
str = "c:\this\is_a\long\filepath.txt";
newstr = abbreviatedFilePath(str);
// newsttr = "...\long\filepath.txt"&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 17 Jun 2020 23:25:08 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-modify-font-size-of-text-inside-combo-box/m-p/273373#M53171</guid>
      <dc:creator>David_Burnham</dc:creator>
      <dc:date>2020-06-17T23:25:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to modify font size of text inside combo box?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-modify-font-size-of-text-inside-combo-box/m-p/273378#M53174</link>
      <description>&lt;P&gt;or ...&amp;nbsp;&lt;/P&gt;
&lt;P&gt;replace the combo box with a text box.&amp;nbsp; Use the text box to show the name of the selected parameter (using a small font).&amp;nbsp; Next to it, have a "select" button.&amp;nbsp; Use the button script to launch a new window containing the combo box or list box with the parameter names.&amp;nbsp; Since it is a separate window with no other content you should be able to display the full length names without any problem); make this window modal and update the text box when the window is closed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is some crude code to illustrate the idea:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;names default to here(1);

NewWindow("Test",
	BorderBox(top(20),bottom(20),left(20),right(20),
		VListBox(
			TextBox("Selected Parameter",&amp;lt;&amp;lt;setFontStyle("Bold")),
			HListBox(
				here:tb = TextEditBox("parameter name 1",&amp;lt;&amp;lt;enable(0),&amp;lt;&amp;lt;setWidth(130)),
				SpacerBox(size(6,0)),
				ButtonBox("select",
					NewWindow("Select",&amp;lt;&amp;lt;modal,
						&amp;lt;&amp;lt;onCLose(
							here:tb&amp;lt;&amp;lt;setText(cb&amp;lt;&amp;lt;getSelected)
						),
						BorderBox(top(20),bottom(20),left(20),right(20),
							cb = ComboBox({"parameter name 1","parameter name 2"})
						)
					),
					underlinestyle(1)
				)
			)
		)
	)
)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jun 2020 23:49:29 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-modify-font-size-of-text-inside-combo-box/m-p/273378#M53174</guid>
      <dc:creator>David_Burnham</dc:creator>
      <dc:date>2020-06-17T23:49:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to modify font size of text inside combo box?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-modify-font-size-of-text-inside-combo-box/m-p/273381#M53175</link>
      <description>&lt;P&gt;This is a great idea.....the Button Box can actually just be an icon, and that icon can be a down arrow&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jun 2020 00:18:24 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-modify-font-size-of-text-inside-combo-box/m-p/273381#M53175</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2020-06-18T00:18:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to modify font size of text inside combo box?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-modify-font-size-of-text-inside-combo-box/m-p/273391#M53177</link>
      <description>&lt;P&gt;If you are working with a window that is stretchable, you might consider making the Combo Box stretchable as well.&amp;nbsp; It will take min and max sizes, and while it prefers the full size of the text, it will shrink to a smaller size if forced to by a box like Splitter Box.&amp;nbsp; It does not offer truncation options, so you will only see the first part of the string.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;New Window( "Combo",
	H Splitter Box(
		Size( 600, 300 ),
		gb=Graph Box(),
		combo = Combo Box(
			{"This is long combo option 1 that I would like to truncate",
			"This is long combo option 2 that I would like to truncate"},
			&amp;lt;&amp;lt;Set Min Size( 30, 1 ),
			&amp;lt;&amp;lt;Set Max Size( 3000, 1 ),
			&amp;lt;&amp;lt;Set Auto Stretching( 1, 0 )
		),
		&amp;lt;&amp;lt;Sizes({0.7,0.3})
	)
);
gb[FrameBox(1)] &amp;lt;&amp;lt; Set Min Size(30,30) &amp;lt;&amp;lt; Set Max Size(3000,1) &amp;lt;&amp;lt; Set Auto Stretching(1,1);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Untitled.png" style="width: 602px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/24682i6D6DDFFA57D18D94/image-size/large?v=v2&amp;amp;px=999" role="button" title="Untitled.png" alt="Untitled.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jun 2020 02:49:28 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-modify-font-size-of-text-inside-combo-box/m-p/273391#M53177</guid>
      <dc:creator>danschikore</dc:creator>
      <dc:date>2020-06-18T02:49:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to modify font size of text inside combo box?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-modify-font-size-of-text-inside-combo-box/m-p/275268#M53408</link>
      <description>Very creative, I like this approach a lot. Thanks!</description>
      <pubDate>Wed, 24 Jun 2020 17:46:22 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-modify-font-size-of-text-inside-combo-box/m-p/275268#M53408</guid>
      <dc:creator>James_Hark</dc:creator>
      <dc:date>2020-06-24T17:46:22Z</dc:date>
    </item>
  </channel>
</rss>

