cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
The Discovery Summit 2025 Call for Content is open! Submit an abstract today to present at our premier analytics conference.
%3CLINGO-SUB%20id%3D%22lingo-sub-709697%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3EBestimmte%20Elemente%20in%20einem%20Listenfeld%20werden%20fett%20dargestellt%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-709697%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EHallo%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIch%20m%C3%B6chte%20bestimmte%20Werte%20in%20einem%20Listenfeld%20fett%20hervorheben.%20Ist%20es%20m%C3%B6glich%20%3F%3C%2FP%3E%3CP%3EIm%20Beispiel%20unten%20m%C3%B6chte%20ich%20beispielsweise%20nur%20%E2%80%9EZweites%20Element%E2%80%9C%20fett%20schreiben.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3ENew%20Window(%20%22Example%22%2C%0A%20fontobj%20%3D%20lb%20%3D%20List%20Box(%0A%20%20%7B%22First%20Item%22%2C%20%22Second%20Item%22%2C%20%22Third%20Item%22%7D%2C%0A%20%20width(%20200%20)%2C%0A%20%20max%20selected(%202%20)%2C%0A%20%20nlines(%206%20)%0A%20)%0A)%3B%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-709697%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CLINGO-LABEL%3EAutomatisierung%20und%20Skripterstellung%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EWindows%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-709708%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3EBetreff%3A%20Bestimmte%20Elemente%20in%20einem%20Listenfeld%20fett%20markieren%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-709708%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EIch%20denke%2C%20bei%20Listenfeldern%20kann%20man%20nur%20festlegen%2C%20welche%20Elemente%20ausgew%C3%A4hlt%20werden%20oder%20welchen%20Stil%20sie%20haben.%20Gibt%20es%20einen%20bestimmten%20Grund%2C%20warum%20Sie%20eine%20einzelne%20Option%20fett%20markieren%20m%C3%B6chten%3F%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3ENames%20Default%20To%20Here(1)%3B%0A%0Anw%20%3D%20New%20Window(%22Example%22%2C%0A%20lb%20%3D%20List%20Box(%0A%20%20%7B%22First%20Item%22%2C%20%22Second%20Item%22%2C%20%22Third%20Item%22%7D%2C%0A%20%20width(200)%2C%0A%20%20max%20selected(2)%2C%0A%20%20nlines(6)%0A%20)%0A)%3B%0A%0Alb%20%26lt%3B%26lt%3B%20Set%20Selected(2)%3B%0Alb%20%26lt%3B%26lt%3B%20Set%20Font%20Style(%22Italic%20Bold%20Underline%22)%3B%0A%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-709803%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3EBetreff%3A%20Bestimmte%20Elemente%20in%20einem%20Listenfeld%20fett%20markieren%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-709803%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EEs%20gibt%20viele%20Gr%C3%BCnde%2C%20warum%20es%20sinnvoll%20sein%20k%C3%B6nnte%2C%20bestimmte%20Eintr%C3%A4ge%20in%20einem%20Listenfeld%20fett%20zu%20formatieren%20oder%20zu%20formatieren!Ich%20habe%20eine%20App%2C%20mit%20der%20ich%20ein%20schnelles%20Durchsuchen%20meiner%20API-Funktionen%20erlaube%2C%20ganz%20%C3%A4hnlich%20dem%20JMP%20Scripting%20Index.Um%20die%20Formatierung%20zu%20erm%C3%B6glichen%2C%20die%20beim%20visuellen%20Parsen%20hilft%2C%20musste%20ich%20Listenfelder%20mithilfe%20der%20Tabellenbox%20und%20der%20COL-Box%20neu%20erstellen%20und%20sie%20in%20eine%20Mausbox%20einschlie%C3%9Fen%2C%20um%20zu%20erkennen%2C%20auf%20welches%20Element%20geklickt%20wird%2C%20und%20um%20bestimmte%20Aktionen%20ausf%C3%BChren%20zu%20k%C3%B6nnen%20Darauf%20basierende%20Aktionen%20(z.%20B.%20das%20Verbieten%20der%20Auswahl%20bestimmter%20Eintr%C3%A4ge).%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EEs%20war%20eine%20Menge%20Arbeit%2C%20aber%20jetzt%20ist%20es%20einfach%20ein%20Widget%2C%20das%20ich%20mit%20einer%20Codezeile%20in%20jedes%20Skript%20einbetten%20kann%2C%20genau%20wie%20das%20integrierte%20Listenfeld.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBei%20den%20beiden%20Listenfeldern%20in%20diesem%20Skript%20handelt%20es%20sich%20tats%C3%A4chlich%20um%20TableBoxes%2C%20die%20in%20ein%20Mausfeld%20eingebunden%20sind%2C%20aber%20die%20zus%C3%A4tzliche%20M%C3%B6glichkeit%20zur%20individuellen%20Formatierung%20von%20Eintr%C3%A4gen%20ist%20unbestreitbar.%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22ErraticAttack_1-1702673667909.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22ErraticAttack_1-1702673667909.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22ErraticAttack_1-1702673667909.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22ErraticAttack_1-1702673667909.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22ErraticAttack_1-1702673667909.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22ErraticAttack_1-1702673667909.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22ErraticAttack_1-1702673667909.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22ErraticAttack_1-1702673667909.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22ErraticAttack_1-1702673667909.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22ErraticAttack_1-1702673667909.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22ErraticAttack_1-1702673667909.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22ErraticAttack_1-1702673667909.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22ErraticAttack_1-1702673667909.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22ErraticAttack_1-1702673667909.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22ErraticAttack_1-1702673667909.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22ErraticAttack_1-1702673667909.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22ErraticAttack_1-1702673667909.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F59739i11770BDAABC2EE3F%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22ErraticAttack_1-1702673667909.png%22%20alt%3D%22ErraticAttack_1-1702673667909.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F46646%22%20target%3D%22_blank%22%3E%40SophieCuvillier%3C%2FA%3E%20%2C%20die%20kurze%20Antwort%20ist%20nein%20%E2%80%93%20JMP%20bietet%20uns%20einfachen%20Skriptern%20keine%20M%C3%B6glichkeit%2C%20die%20einzelnen%20Eintr%C3%A4ge%20in%20einem%20Listenfeld%20zu%20%C3%A4ndern.Sie%20verf%C3%BCgen%20%C3%BCber%20diese%20F%C3%A4higkeit%2C%20da%20der%20JMP%20Scripting%20Index%20dies%20mit%20den%20von%20ihnen%20verwendeten%20Listenfeldern%20tut.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWenn%20Sie%20sich%20M%C3%BChe%20geben%2C%20k%C3%B6nnen%20Sie%20TableBoxes%20dazu%20bringen%2C%20sich%20wie%20ein%20Listenfeld%20zu%20verhalten%2C%20aber%20das%20erfordert%20ein%20wenig%20Arbeit.Gem%C3%A4%C3%9F%20den%20Vorschriften%20meines%20Unternehmens%20kann%20ich%20meinen%20Code%20daf%C3%BCr%20nicht%20herausgeben%2C%20bin%20aber%20bei%20Bedarf%20bereit%2C%20bei%20der%20Beantwortung%20aller%20Fragen%20behilflich%20zu%20sein.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-709905%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3EBetreff%3A%20Bestimmte%20Elemente%20in%20einem%20Listenfeld%20fett%20markieren%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-709905%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EWow!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-710061%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3EBetreff%3A%20Bestimmte%20Elemente%20in%20einem%20Listenfeld%20fett%20markieren%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-710061%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EHallo%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EVielen%20Dank%3CA%20href%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F14366%22%20target%3D%22_blank%22%3E%20%40jthi%3C%2FA%3E%20und%20dir%20f%C3%BCr%20die%20Antwort.Ich%20muss%20bestimmte%20Werte%20fett%20hervorheben%2C%20weil%20sie%20f%C3%BCr%20Benutzer%20einen%20anderen%20Nutzen%20haben%20als%20andere%20Werte%20und%20sie%20sie%20visuell%20allein%20durch%20den%20angezeigten%20Namen%20unterscheiden%20m%C3%B6chten.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F26363%22%20target%3D%22_blank%22%3E%40ErraticAttack%3C%2FA%3E%20Ihre%20Antwort%20hat%20mir%20sehr%20geholfen%2C%20danke.%20Ich%20werde%20eine%20Boxtabelle%20erstellen%2C%20die%20das%20Verhalten%20einer%20Boxliste%20nachahmt%2C%20und%20die%20gew%C3%BCnschten%20Werte%20darin%20fett%20formatieren.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-710142%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3EBetreff%3A%20Bestimmte%20Elemente%20in%20einem%20Listenfeld%20fett%20markieren%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-710142%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EWas%20w%C3%A4re%2C%20wenn%20Sie%20die%20Liste%20in%20zwei%20Listen%20aufteilen%20w%C3%BCrden%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-712087%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3EBetreff%3A%20Bestimmte%20Elemente%20in%20einem%20Listenfeld%20fett%20markieren%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-712087%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EIch%20muss%20alle%20Werte%20(fett%20und%20nicht%20fett)%20an%20derselben%20Stelle%20haben%2C%20sie%20m%C3%BCssen%20in%20alphabetischer%20Reihenfolge%20sortiert%20sein%3C%2FP%3E%3C%2FLINGO-BODY%3E
Choose Language Hide Translation Bar

Bold specific items in a list box

Hello,

 

I would like to higlight in bold specific values in a list box. Is it possible ?

For instance in the example below, I would like to put in bold only "Second Item"

 

New Window( "Example",
	fontobj = lb = List Box(
		{"First Item", "Second Item", "Third Item"},
		width( 200 ),
		max selected( 2 ),
		nlines( 6 )
	)
);
1 ACCEPTED SOLUTION

Accepted Solutions
ErraticAttack
Level VI

Re: Bold specific items in a list box

There are many reasons I can think of why bolding / formatting specific entries in a list box could be useful!  I have an app where I allow for quick browsing of my API features in a way very similar to the JMP Scripting Index.  In order to allow for the formatting that helps with visual parsing I've had to re-create list boxes using Table Box and COL Box, wrapped inside of a mouse-box to be able to know which item is being clicked on and perform certain actions based on that (like disallowing certain entries from being selected).

 

It was a lot of work, but now it is simply a widget that I can embed in any script with one line of code, just like the built-in list box.

 

The two list boxes in this script are indeed TableBoxes wrapped within a mouse box, but the added ability for individual entry formatting is undeniable. 

ErraticAttack_1-1702673667909.png

 

@SophieCuvillier , the short answer is no -- JMP does not provide any capabilities for us lowly scripters to modify the individual entries in a list box.  They do have that capability, as the JMP Scripting Index does it with the list boxes they use.

 

If you're endeavorous you can make TableBoxes behave like a list box, but it does require a bit of work.  I cannot give out my code for it per my companies regulations, but I'd be willing to help answer any questions if needed.

Jordan

View solution in original post

6 REPLIES 6
jthi
Super User

Re: Bold specific items in a list box

I think with list boxes you can only set which is selected or style for all the items. Is there a specific reason why you would like to bold single option?

Names Default To Here(1);

nw = New Window("Example",
	lb = List Box(
		{"First Item", "Second Item", "Third Item"},
		width(200),
		max selected(2),
		nlines(6)
	)
);

lb << Set Selected(2);
lb << Set Font Style("Italic Bold Underline");
-Jarmo
ErraticAttack
Level VI

Re: Bold specific items in a list box

There are many reasons I can think of why bolding / formatting specific entries in a list box could be useful!  I have an app where I allow for quick browsing of my API features in a way very similar to the JMP Scripting Index.  In order to allow for the formatting that helps with visual parsing I've had to re-create list boxes using Table Box and COL Box, wrapped inside of a mouse-box to be able to know which item is being clicked on and perform certain actions based on that (like disallowing certain entries from being selected).

 

It was a lot of work, but now it is simply a widget that I can embed in any script with one line of code, just like the built-in list box.

 

The two list boxes in this script are indeed TableBoxes wrapped within a mouse box, but the added ability for individual entry formatting is undeniable. 

ErraticAttack_1-1702673667909.png

 

@SophieCuvillier , the short answer is no -- JMP does not provide any capabilities for us lowly scripters to modify the individual entries in a list box.  They do have that capability, as the JMP Scripting Index does it with the list boxes they use.

 

If you're endeavorous you can make TableBoxes behave like a list box, but it does require a bit of work.  I cannot give out my code for it per my companies regulations, but I'd be willing to help answer any questions if needed.

Jordan
hogi
Level XII

Re: Bold specific items in a list box

wow!

Re: Bold specific items in a list box

Hello,

 

Thank you very much @jthi and you for the answer. I need to highlight certain values in bold because they have a different utility for users than other values and they want to be able to differentiate them visually just by the name displayed.

 

@ErraticAttack  Your answer helped me a lot, thank you. I'm going to make a box table that mimics the behavior of a box list and bold the values I want in it.

 

 

Re: Bold specific items in a list box

What if you split the list into two lists?

Re: Bold specific items in a list box

I need to have all the values (bold and not bold) in the same place, it must be sorted by alphabetical order