<?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: JSL: How to change the width of a combo box in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/JSL-How-to-change-the-width-of-a-combo-box/m-p/667055#M85507</link>
    <description>&lt;P&gt;Does anyone have any ideas on how to make a combo box narrower instead of wider? &amp;nbsp;Even if I change the items in my list to single characters only, the combo box width seems to have a mind of its own:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);
New Window("Example",
	cb = Combo Box({"i"})
);
cb &amp;lt;&amp;lt; Get Width;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;With the example above, the width is 107. &amp;nbsp;This is way too large for a single letter, in my opinion. &amp;nbsp;But if I add a "j" to the list, so the list is {"i", "j"}, the width actually gets&amp;nbsp;&lt;EM&gt;narrower&lt;/EM&gt;, and goes to 71. &amp;nbsp;Anyone know why? &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PS: I'm using JMP Pro 17.1.0 and MacOS Ventura 13.4.1.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PPS: replying to&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2687"&gt;@txnelson&lt;/a&gt;&amp;nbsp;: Question about the scripting index... &amp;nbsp;The "&amp;lt;&amp;lt; Get Width" command isn't listed under "Item Messages" for Combo Box, but it is listed under "Shared Item Messages". &amp;nbsp;I've often been confused by this, bc it seems to suggest the user should be able to apply &amp;lt;&amp;lt; Get Width to a combo box. &amp;nbsp;But as discussed here, that doesn't seem to be the case. &amp;nbsp;If the commands in this "Shared Item Messages" section aren't necessarily able to be used on the display box, what is the meaning behind that section (asking sincerely...I am genuinely curious). &amp;nbsp;Thanks!&lt;/P&gt;</description>
    <pubDate>Wed, 09 Aug 2023 16:01:13 GMT</pubDate>
    <dc:creator>nikles</dc:creator>
    <dc:date>2023-08-09T16:01:13Z</dc:date>
    <item>
      <title>JSL: How to change the width of a combo box</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-How-to-change-the-width-of-a-combo-box/m-p/425467#M67494</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; I am working on some JSL code where I have some combo boxes listed in a V List Box(); The lists for the combo boxes are all of different character lengths, but I'd like the combo boxes to all have the same width.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; The normal &amp;lt;&amp;lt;Set Width() call doesn't seem to work as expected. I could go in and manually change the character widths by padding the right of each item in each list with spaces, but that seems rather inefficient.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Tried looking this one up, but most discussions are about Text Boxes() or other similar items, not Combo Boxes().&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Any suggestions help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!,&lt;/P&gt;&lt;P&gt;DS&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 18:02:04 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-How-to-change-the-width-of-a-combo-box/m-p/425467#M67494</guid>
      <dc:creator>SDF1</dc:creator>
      <dc:date>2023-06-09T18:02:04Z</dc:date>
    </item>
    <item>
      <title>Re: JSL: How to change the width of a combo box</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-How-to-change-the-width-of-a-combo-box/m-p/425490#M67495</link>
      <description>&lt;P&gt;The &lt;STRONG&gt;Scripting Index&lt;/STRONG&gt; for ComboBox shows all messages that can be set.&amp;nbsp; Width is not one of them.&amp;nbsp; However I have be able to handle the need by embedding non printable characters.&amp;nbsp; Here is an example&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
New Window( "Example",
	cb = Combo Box(
		{"One\!t", "Two", "Three"},
		selection = cb &amp;lt;&amp;lt; GetSelected();
		Print( "Selected: " || selection );
	),
	cb2 = combo box( {"a    \!t","b","c"})
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="txnelson_0-1633984313849.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/36491iCC6A381543795555/image-size/medium?v=v2&amp;amp;px=400" role="button" title="txnelson_0-1633984313849.png" alt="txnelson_0-1633984313849.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Oct 2021 20:32:03 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-How-to-change-the-width-of-a-combo-box/m-p/425490#M67495</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2021-10-11T20:32:03Z</dc:date>
    </item>
    <item>
      <title>Re: JSL: How to change the width of a combo box</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-How-to-change-the-width-of-a-combo-box/m-p/425599#M67506</link>
      <description>&lt;P&gt;The builtin LineupBox is designed just for this case, example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
New Window( "Example",
	Lineup Box( N Col( 1 ), Spacing( 0, 2 ),
		Spacer Box( Size( 120, 0 ) )
	,
		cb = Combo Box(
			{"One", "Two", "Three"},
			selection = cb &amp;lt;&amp;lt; GetSelected();
			Print( "Selected: " || selection );
		)
	,
		cb2 = combo box( {"a","b","c"} )
	);
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 12 Oct 2021 06:19:36 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-How-to-change-the-width-of-a-combo-box/m-p/425599#M67506</guid>
      <dc:creator>ErraticAttack</dc:creator>
      <dc:date>2021-10-12T06:19:36Z</dc:date>
    </item>
    <item>
      <title>Re: JSL: How to change the width of a combo box</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-How-to-change-the-width-of-a-combo-box/m-p/425649#M67511</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/26363"&gt;@ErraticAttack&lt;/a&gt;&amp;nbsp; and&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2687"&gt;@txnelson&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Thanks for your quick feedback. I tried the escape characters, but they don't always work as expected due to the difference in character length of the multiple different combo boxes and their entries. I ended up going with&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/26363"&gt;@ErraticAttack&lt;/a&gt;'s solution as the Lineup Box() environment worked perfectly. Now, I'll go back and change my other code because I was using nested H List Box() and V List Box() environments with Spacer Box(Size()) entries to edit the aesthetics of the GUI. The Lineup Box() works great and is pretty easy and intuitive.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the help!,&lt;/P&gt;&lt;P&gt;DS&lt;/P&gt;</description>
      <pubDate>Tue, 12 Oct 2021 12:59:54 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-How-to-change-the-width-of-a-combo-box/m-p/425649#M67511</guid>
      <dc:creator>SDF1</dc:creator>
      <dc:date>2021-10-12T12:59:54Z</dc:date>
    </item>
    <item>
      <title>Re: JSL: How to change the width of a combo box</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-How-to-change-the-width-of-a-combo-box/m-p/667055#M85507</link>
      <description>&lt;P&gt;Does anyone have any ideas on how to make a combo box narrower instead of wider? &amp;nbsp;Even if I change the items in my list to single characters only, the combo box width seems to have a mind of its own:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);
New Window("Example",
	cb = Combo Box({"i"})
);
cb &amp;lt;&amp;lt; Get Width;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;With the example above, the width is 107. &amp;nbsp;This is way too large for a single letter, in my opinion. &amp;nbsp;But if I add a "j" to the list, so the list is {"i", "j"}, the width actually gets&amp;nbsp;&lt;EM&gt;narrower&lt;/EM&gt;, and goes to 71. &amp;nbsp;Anyone know why? &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PS: I'm using JMP Pro 17.1.0 and MacOS Ventura 13.4.1.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PPS: replying to&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2687"&gt;@txnelson&lt;/a&gt;&amp;nbsp;: Question about the scripting index... &amp;nbsp;The "&amp;lt;&amp;lt; Get Width" command isn't listed under "Item Messages" for Combo Box, but it is listed under "Shared Item Messages". &amp;nbsp;I've often been confused by this, bc it seems to suggest the user should be able to apply &amp;lt;&amp;lt; Get Width to a combo box. &amp;nbsp;But as discussed here, that doesn't seem to be the case. &amp;nbsp;If the commands in this "Shared Item Messages" section aren't necessarily able to be used on the display box, what is the meaning behind that section (asking sincerely...I am genuinely curious). &amp;nbsp;Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 09 Aug 2023 16:01:13 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-How-to-change-the-width-of-a-combo-box/m-p/667055#M85507</guid>
      <dc:creator>nikles</dc:creator>
      <dc:date>2023-08-09T16:01:13Z</dc:date>
    </item>
    <item>
      <title>Re: JSL: How to change the width of a combo box</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-How-to-change-the-width-of-a-combo-box/m-p/667056#M85508</link>
      <description>&lt;P&gt;Quick correction to my post. &amp;nbsp;In the "PPS", I was speaking about the "Set Width" command, not the Get Width. &amp;nbsp;Get Width seems to work on combo boxes. &amp;nbsp;Sorry for any confusion.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Aug 2023 16:04:32 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-How-to-change-the-width-of-a-combo-box/m-p/667056#M85508</guid>
      <dc:creator>nikles</dc:creator>
      <dc:date>2023-08-09T16:04:32Z</dc:date>
    </item>
    <item>
      <title>Re: JSL: How to change the width of a combo box</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-How-to-change-the-width-of-a-combo-box/m-p/667468#M85552</link>
      <description>&lt;P&gt;The combo box actually does respond to "&amp;lt;&amp;lt;Set Width()" message, but it immediately resets to the width automatically assigned by JMP.&amp;nbsp; I have not found a way to override this behavior.&amp;nbsp; Glad Lineup Box exists!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
New Window( "test", a = Combo Box( {"i"} ) );
Show( a &amp;lt;&amp;lt; Get Width );  //31
a &amp;lt;&amp;lt; Set Width( 100 );
Show( a &amp;lt;&amp;lt; Get Width );  //100
Wait( .1 );
Show( a &amp;lt;&amp;lt; Get Width );  //31&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;As for the wider Combo Box you are seeing when the list is only {"i"}, that appears to be an operating system issue.&amp;nbsp; As you can see, I get a width of 31, running Windows 11.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Aug 2023 12:40:19 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-How-to-change-the-width-of-a-combo-box/m-p/667468#M85552</guid>
      <dc:creator>mmarchandTSI</dc:creator>
      <dc:date>2023-08-11T12:40:19Z</dc:date>
    </item>
  </channel>
</rss>

