Re: Change color and underline contents of a string col box or table box.Thank you Peter. That was a great presentation, and it was very helpful.
Re: Change color and underline contents of a string col box or table box.Justin Chilton and I gave a talk that included col boxes at the Discovery 2018 Summit.
Supercharge Your User Interfaces in JSL ( US 2018 113 )
Re: Change color and underline contents of a string col box or table box.Thanks very much Jarmo. I appreciate the help and insight on the behavior.
Re: Change color and underline contents of a string col box or table box.You should be able to avoid the crashes by building Col Box "correctly". If I remember correctly << append has worked for me, but you cannot use << Set. I have contacted support about that sometime ago. Issue is supposed to be fixed on JMP17.
My example I provided them with was this (THIS WILL CRASH JMP16):
Names Default To Here(1);
stop(); // THIS WILL CRASH JMP
nw = New WindoW("",
Table Box(
cb = Col Box("icons",
Icon Box("Excluded"),
Icon Box("Excluded"),
)
)
);
cb << Set({"a", "b"});
So if I were to use Col Box and wanted to replace value, I would always just rebuild it.
Re: Change color and underline contents of a string col box or table box.Hi @jthi , sorry to bother you, but I was hoping you or maybe someone from the JMP team could elaborate further on the part about JMP crashing when building a col box. Any tips on how to avoid that sort of behavior?
Re: Change color and underline contents of a string col box or table box.Can you elaborate further on the part about JMP crashing? Is it predictable, or does it happen with a large number of items in a col box()? I'd probably want to avoid this in many cases, as it is likely to be used in scripts where any number of parameters may be plotted. Anywhere from a few plots to a thousand or so.
Re: Change color and underline contents of a string col box or table box.There are also some other downsides on using col box, for example more difficult to get values from, sometimes you can crash JMP when building Col Box... but I don't know of any simple means of changing String Col Box title color besides <
Re: Change color and underline contents of a string col box or table box.Thanks Jarmo. It definitely looks better, though there is the downside of not being able to right click and 'make into data table', but I don't think that feature is that important.
I had typed these two questions here, but I just answered them for myself... What code is changing the text to blue? And why do the button boxes appear as text only and not the usual buttons we see like the 'back' to top examples here? The answer is your << Underline Style(1); does both of these things. Seems it is an alternate display of the button box. Thanks for sharing, I didn't know about that.
Re: Change color and underline contents of a string col box or table box.You could maybe use Col Box instead of String Col Box and use button boxes in col box
Names Default To Here( 1 );
//dummy data table
dt = Open( "$SAMPLE_DATA/Semiconductor Capability.jmp" );
// create a list of columns. In the example table, the first 4 columns are categorical index columns, so we'll use 20 columns starting at column 5 (4 + i)
colList = {};
for( i = 1, i<=20, i++,
colList[i] = as column(dt, 4 + i) << get name();
);
// new window, table box with selectable rows
nw = New Window( "Example",
vlb = vlistbox(
mainOlb = Outline Box( "Table", // used for referencing scrolling back to top
tb = Table Box(
scb = Col Box( "names", {}), // scb will be used later to color in blue to indicate it is a pseudo-hyperlink
)
)
);
);
For Each({col}, colList,
scb << Append(Button Box(col, << Set Function(function({this},
nw << scroll window(cb[Contains(colList, this << Get Button Name)]);
)), << Underline Style(1);
));
);
//append some distributions in their own context boxes, but keep a reference variable for the conext box cb[i].
cb = {};
for( i = 1, i <= 20, i++,
vlb << append(
cb[i] = contextbox(
distribution(column(4 + i)) // put the i'th distribution in context box[i]
)
);
vlb<<APPEND></APPEND>Change color and underline contents of a string col box or table box.Hi, I posted a similar version of the code below last week, and now I'm trying to update the values in the string col box() / table box() to be blue and underlined so they appear to be hyperlinks. The table box << text color() command was not working for me, but the string col box << text color() works. Is there a way to do this so the header of the column, "names" in the example below, does not change color? Is there a way to set the values to be underlined?
Thanks
Mike
Names Default To Here( 1 );
//dummy data table
dt = Open( "$SAMPLE_DATA/Semiconductor Capability.jmp" );
// create a list of columns. In the example table, the first 4 columns are categorical index columns, so we'll use 20 columns starting at column 5 (4 + i)
colList = {};
for( i = 1, i<=20, i++,
colList[i] = as column(dt, 4 + i) << get name();
);
// new window, table box with selectable rows
nw = New Window( "Example",
vlb = vlistbox(
mainOlb = Outline Box( "Table", // used for referencing scrolling back to top
tb = Table Box(
scb = String Col Box( "names", colList ), // scb will be used later to color in blue to indicate it is a pseudo-hyperlink
<<SET selectable="" rows=""> 0,
nw << scroll window(cb[itemNum[1]]);
);
)
);
</SET>JMP standard version 16.2.0
Mass Customization