6
$\begingroup$

Things like Slider have special option values like Appearance -> "LeftArrow". How can I find all of the possible values it takes, since I can't even look at the DownValues for it?

$\endgroup$
  • $\begingroup$ at least closely related: 18918 $\endgroup$ – Kuba Sep 18 '17 at 12:20
3
$\begingroup$

One option is to see what the Options Inspector has for you. It's tedious, though, to look this up manually though, so here's a way to automatically import these:

oiOps =
  StringCases[
    Import[
     FrontEndExecute@
      FrontEnd`FindFileOnPath["OptionInspectorStrings.tr", 
       "PrivatePathsTextResources"], "String"],
    "@@resource" ~~ r : Except["\n"] .. ~~ "StringTable" :> 
     StringTrim[r]
    ] // AssociationMap[FrontEndResource[# <> "StringTable"] &];

(Note that I'm only selecting those resource names with "StringTable" at the end. There are others there to work with too.)

Then:

oiOps["sliderAppearance"]

{"Automatic", "None", "Default", "Vertical", "LeftArrow", \
"RightArrow", "UpArrow", "DownArrow"}

And we can see these are the appearances the options inspector knows about.

A cool set of options many of which I didn't know about:

oiOps["buttonFrame"]

{"Automatic", "None", "\"Frameless\"", "\"Framed\"", "\"Button\"", \
"\"DialogBox\"", "\"Palette\"", "\"FramedPalette\"", "\"Tab\"", \
"\"ActiveTab\"", "\"AbuttingRight\"", "\"AbuttingLeftRight\"", \
"\"AbuttingLeft\"", "\"DefaultButton\"", "\"CancelButton\"", \
"\"ColorSetter\"", "\"Popup\"", "\"PopupMenu\"", "\"ActionMenu\"", \
"\"TextField\"", "\"ComboBox\""}

(Note that "TextField" and "ComboBox" seem to be there to implement this stuff)

Even if it's in this list, it may still not have an effect. Of these:

oiOps["locatorAppearance"]

{"Automatic", "None", "Default", "Point", "Thumb", "Crosshairs"} 

Only None does anything different for me.

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.