12
$\begingroup$

As explained in this solution,

ListAnimate[Table[Plot[Sin[n x], {x, 0, 2}], {n, 3}]]//InputForm

will allow me to view the types of appearance element for the ListAnimate controller. But the same method does not work for simple controls or compound Manipulate-s, e.g.

Control[{{u, 3, "hello"}, 1, 5, 0.1}] // InputForm
Manipulate[u, {{u, 3, "hello"}, 1, 5, 0.1}] // InputForm

as both are already in InputForm. Is there a complete list of AppearanceElement types in the documentation (I doubt that) or elsewhere, or a trustworthy way of extracting this information?

Added in response to Nasser's solution: it would also be good to allocate exactly which appearance elements are appropriate to each control; looking at Animator I've found a couple more which are in the relevant documentation, see answer below.

It is odd that the ResetPlayButton looks exactly like the PlayButton, as far as I can see.

$\endgroup$
4
  • $\begingroup$ I'm planning to update the control list so exactly those appearance elements relevant to the control are used to produce the same effect as AppearanceElements -> All, but I'm not sure of the protocol here as @Nasser is compiling a parallel list and I'll be happy to accept his solution as soon as it seems we have a complete list. Should I add my own solution at this point? $\endgroup$
    – fairflow
    Apr 26, 2014 at 11:14
  • $\begingroup$ The total is now up to 26, including All and None which seem equally valid. $\endgroup$
    – fairflow
    Apr 26, 2014 at 11:15
  • $\begingroup$ I did not know you are collecting these also, since you asked the question :). I'll change my answer to community wiki so you can feel to add your there and make any edits you like. $\endgroup$
    – Nasser
    Apr 26, 2014 at 14:33
  • $\begingroup$ @Nasser, I didn't plan to as I thought someone might reveal a complete list, but so far I'm not convinced we've got them all, which is why I started my own list as I wasn't confident about editing yours. And then I reasoned that just having a list wasn't so useful as we'd like to know which element corresponds to which control. I think community wiki is a good idea but don't know much about that, or how it relates to reputation. $\endgroup$
    – fairflow
    Apr 27, 2014 at 20:45

1 Answer 1

11
$\begingroup$

Update 2: Found a few more and started to document which elements apply to which controls. The total number of elements is now 27 (or 29 if you include All and None). I could not find examples for the InteractiveTradingChart elements or for the UpdateButton. Can anyone help there?

appearanceList =
  {"AutorunPlayButton",
   "BookmarksButton",
   "BookmarksPlayButton",
   "ContentResizeArea",
   "DirectionButton",
   "FasterSlowerButtons",
   "HideControlsButton",
   "InlineInputField",
   "InputField",
   "InteractiveTradingChartMenu",
   "InteractiveTradingChartResetButton",
   "InteractiveTradingChartSnapshotButton",
   "ManipulateMenu",
   "ManipulatePlayButton",
   "PauseButton",
   "PlayButton",
   "PlayPauseButton",
   "ProgressSlider",
   "ResetButton",
   "ResetPlayButton",
   "SnapshotButton",
   "Spectrum",
   "StepLeftButton",
   "StepRightButton",
   "Swatch",
   "SwatchSpectrum",
   "UpdateButton"};

DynamicModule[{sal, dx = 0.5, dy = 0.5, anim1, anim2, loc, swatch, a1,
   a2, a3, a4, a5, a6, a7}, 
 Column@{a1 =(*Control[{sal,1,10,
    AppearanceElements\[Rule]appearanceList,
    Appearance\[Rule]"Open"}],*)        
    Control[{sal, 1, 10, AppearanceElements -> {
        "DirectionButton",
        "FasterSlowerButtons",
        "InlineInputField",
        "InputField",
        (*"PauseButton",*)
        (*"PlayButton",*)            
        "PlayPauseButton",
        (*"ResetButton",*)
        (*"ResetPlayButton",*)            
        "StepLeftButton",
        "StepRightButton"}, Appearance -> "Open"}],
   a3 = Slider2D[Dynamic@{dx, dy}],(* no appearance elements *)
   a4 =(*Animator[Dynamic[anim1],{0,1,0.1},
    AppearanceElements\[Rule]appearanceList,
    AnimationRunning\[Rule]False],*)        
    Animator[Dynamic[anim1], {0, 1, 0.1},
     AppearanceElements -> {
       "DirectionButton",
       "FasterSlowerButtons",
       "PauseButton",
       "PlayButton",
       "PlayPauseButton",
       "ProgressSlider",
       "ResetButton",
       "ResetPlayButton",
       "StepLeftButton",
       "StepRightButton"}, AnimationRunning -> False],
   a5 = ColorSlider[Pink, 
     AppearanceElements -> {"Spectrum", "Swatch", "SwatchSpectrum"}],
   a6 = Row[
     Table[ColorSlider[Pink, 
       AppearanceElements -> a], {a, {"Spectrum", "Swatch", 
        "SwatchSpectrum"}}], Spacer@5],
   a7 = Manipulate[
     Plot[Sin[a x], {x, 0, 2 Pi}, ImageSize -> Small], {a, 1, 5}, 
     AppearanceElements -> {"AutorunPlayButton", "BookmarksButton",
       (* this appears to duplicate ManipulateMenu *)           
       "ContentResizeArea", "HideControlsButton", "ManipulateMenu", 
       "ManipulatePlayButton",
       (* this appears to duplicate AutorunPlayButton *)          
       "SnapshotButton"}]}]

Mathematica graphics

Update 1: Thanks to Simon Woods comment below, 3 more are added to list. Now total is 21.

I could not find complete list in one place. Over the years, I collected them from here and there in the docs. Looked at my cheat sheet now and I only see the list. (I should have written the document pages where I got there but did not). This is what I have so far, 18 of them (including None): Once you know the name, you can more easily find it (one hopes) in the docs now

list = {
        "AutorunPlayButton",
        "BookmarksButton", 
        "BookmarksPlayButton"
        "ContentResizeArea", 
        "DirectionButton", 
        "FasterSlowerButtons", 
        "HideControlsButton", 
        "InteractiveTradingChartMenu",
        "InteractiveTradingChartSnapshotButton",
        "InteractiveTradingChartResetButton",
        "InputField", 
        "InlineInputField",
        "ManipulatePlayButton",
        "ManipulateMenu", 
        "PlayPauseButton", 
        "ProgressSlider",
        "ResetButton",                       
        "SnapshotButton", 
        "StepLeftButton", 
        "StepRightButton",                                   
        "UpdateButton", 
        None};

TableForm[Table[{i, list[[i]]}, {i, Length[list]}]]

Mathematica graphics

I remembered old post related to this:

https://stackoverflow.com/questions/7340971/how-to-add-element-show-animation-control-directly-not-using-manipulate-cont

From there:

It is strange that it is so hard to find the names of these elements. I go to ref/AppearanceElements and it does not even list the names. When I go to ref/Manipulate it mentions the following ones under Appearance Elements option {"HideControlsButton", "SnapshotButton", "ResetButton", "UpdateButton" and I tried them all, but they are not what I want.

I went to ref/Manipulator, and saw these "InputField", "StepLeftButton", "PlayPauseButton", "StepRightButton", "FasterSlowerButtons", "DirectionButton", "InlineInputField".

May be in version 10, AppearanceElements will finally show up in one place?

Links to looks for these

http://reference.wolfram.com/mathematica/ref/Manipulator.html

http://reference.wolfram.com/mathematica/ref/Manipulate.html

$\endgroup$
7
  • 3
    $\begingroup$ Some are listed in Manipulate`Dump`$allPossibleAppearanceElements and Manipulate`Dump`$AnimateDefaultAnimatorElements. By the way, "SnapshotButton" appears twice in your list. $\endgroup$ Apr 26, 2014 at 10:22
  • $\begingroup$ @SimonWoods thanks, I've updated the list. $\endgroup$
    – Nasser
    Apr 26, 2014 at 10:38
  • $\begingroup$ MapIndexed[{#2[[1]], #1} &, list] // TableForm is another way to get the table, btw. $\endgroup$
    – fairflow
    Apr 26, 2014 at 11:00
  • 2
    $\begingroup$ @fairflow Automatic Headings will do too. $\endgroup$
    – Kuba
    Apr 26, 2014 at 11:55
  • $\begingroup$ OK, Manipulate``Dump$allPossibleAppearanceElements` works, so why doesn't, say, Animate``Dump``$allPossibleAppearanceElements? $\endgroup$
    – murray
    Apr 26, 2014 at 14:38

This site is temporarily in read-only mode and not accepting new answers.

Not the answer you're looking for? Browse other questions tagged .