How do I modify or create a ButtonStyle?
 To fully understand this, you must first understand option inheritance. http://support.wolfram.com/mathematica/interface/options/inheritance.html The difference with buttons is that at the style sheet level the options for the button are not determined by the style defintion of the cell that contains the button, but the style definition of the button's ButtonStyle option. The style deifinitions for the different ButtonsStyles are found in the style sheet. http://support.wolfram.com/mathematica/interface/options/stylesheet.html If you open a standard style sheet, these will be listed in the sections Palette Styles and Hyperlink Styles. These style definitions pass three kinds of information to a Button with that ButtonStyle. | | Font options (FontColor, FontFamily, FontFace, etc.) that the ButtonContents inherit. |
| | Button options (ButtonFunction, ButtonData, Background, etc.) that the ButtonBox inherits. These are passed through the cell option ButtonBoxOptions. In the Option Inspector, the ButtonBoxOptions are listed under |
| | Menu listing options. (StyleMenuListing and ButtonStyleMenuListing). ButtonStyle style definitions should have the options StyleMenuListing → None (which prevents it from appearing under the menu) and ButtonStyleMenuListing → Automatic (which makes it appear under ). Neither of these options are listed in the Option Inspector. You must unformat the cell to add or change these options. |
Download this FAQ as a Mathematica 5.2 Notebook
Questions or comments? Send email to support@wolfram.com.
| |