Tag Info

New answers tagged

2

Rough approach: Tooltip resources are stored in FileNameJoin[{ $InstallationDirectory, "SystemFiles", "FrontEnd", "TextResources", "ToolTip.tr"}] You can add custom labels by copying this file to $UserBaseDirectory/SystemFiles... and replacing labels you want. For example: @@resource ToolTipCut Cut (replace this line with your own label and ...


1

Edit Code formatting on MMA.SE is not something I excel at. I my haste, I may not have answered your question appropriately. However, as you're only triggering the evaluation of Dynamic[Refresh[...]] on the push of a button (rather than non-deterministically) I believe it is appropriate to push the code here. Note that Method->"Queued" should be used if ...


1

As Fred has suggested, Initialization is the way to go, and here is a minimal example: DynamicModule[{answer, answers = Range@10, order}, Column[{ "Pick 1:", Dynamic[RadioButtonBar[Dynamic@answer, answers[[order]]], TrackedSymbols :> {order}] }] , Initialization :> ( order = RandomSample@Range@Length@answers; ), ...


0

My solution uses SetterBar with the items framed. {SetterBar[Dynamic[x], {"Play" -> Framed[Rotate["\[FilledUpTriangle]", -\[Pi]/2]], "Stop" -> Framed@"\[FilledSquare]"}, BaseStyle -> {FontSize -> 20}], Dynamic@Switch[x, "Play", Style["Play", Green], "Stop", Style["Stop", Red]]} It is pretty close. I'm certain you can tweak the font ...


1

Turned out it was easy to replicate the buttons from Play: $playView=ToExpression@GraphicsBox[ TagBox[{ {GrayLevel[0.9], RectangleBox[{5, -158}, {29, -135}]}, {GrayLevel[0.3], PolygonBox[NCache[{{13, -153}, {13, -140}, {21, Rational[-293, 2]}, {13, -153}}, {{13, -153}, {13, -140}, {21, -146.5}, {13, -153}}]]}, ...


6

Mathematica does it internally by using BoxForm`ArrangeSummaryBox, which is quite straightforward to figure out: MakeBoxes[obj_MyObject, fmt_] ^:= Module[{o = List @@ obj, shown, hidden, icon = Graphics[{Blue, Circle[]}, ImageSize -> 70]}, shown = {{ BoxForm`MakeSummaryItem[{"Name: ", "Name" /. o /. "Name" -> Missing[]}, fmt], ...



Top 50 recent answers are included