wolfram-mathematica - 如何控制 Manipulator 输入字段中的字体外观?

标签 wolfram-mathematica

抱歉,我在这里的第一个问题可能是微不足道的,但我刚刚意识到我不知道如何在 Manipulator 控件的输入字段中设置字体样式。此功能的所有选项都不适用于输入字段 (AFAIK) 中的样式。我想知道输入字段选项是否有效:

Style[Manipulator[0.5, Appearance -> {"Open", Tiny}], 
 DefaultOptions -> {InputField -> {BaseStyle -> Directive[Red, 16]}}]

Mathematica graphics

但它没有。我假设这是微不足道的,但它让我难倒。

编辑

我曾尝试使用本地 Manipulator 风格
Cell[StyleData["Manipulator"],
 ShowStringCharacters->False,
 NumberMarks->False,
 FontFamily:>CurrentValue["PanelFontFamily"],
 FontSize->24,
 FontColor->RGBColor[1,0,0],
 FontWeight->"Bold"]

Mathematica graphics

这是改变字体颜色和粗细(我不希望在我的应用程序中改变这些,只是测试哪些有效,哪些无效)但仍然没有改变字体大小。如果这个样式表解决方案有效,我想现在就足够了,但最终我希望在 Manipulate 中有一个小操纵器:
{{x, 40, "Hello World"}, 20, 100, 5, Appearance -> "Open", 
AppearanceElements -> {"InputField", "StepLeftButton", "StepRightButton",    
                        "HideControlsButton"}, ImageSize -> Tiny}

但在输入字段中使用非小字体,并通过直接编码来实现。

最佳答案

我知道改变字段中文本大小的唯一方法是用 Magnification 击中整个内容。 .使用上面的西蒙的指导来做到这一点 Style :

Style[
  Manipulator[0.5, Appearance -> {"Open", Tiny}], 
  DynamicBoxOptions -> {BaseStyle -> Magnification -> 2}
]

Mathematica graphics

关于wolfram-mathematica - 如何控制 Manipulator 输入字段中的字体外观?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8584954/

相关文章:

wolfram-mathematica - 数学 : Unable to zoom in/out using the mouse on a 3D graphics after Rotate[]

wolfram-mathematica - "Tag Part in (...) is Protected"

c - Mathematica 和 C/C++ : Exchanging Data

wolfram-mathematica - Graphics3D 对象的二维投影

wolfram-mathematica - 内存递归函数。如何让他们万无一失?

localization - Mathematica 中的词法和动态范围 : Local variables with Module, With 和 Block

wolfram-mathematica - 使用 With 绘图与使用 Block 绘图 (Mathematica)

wolfram-mathematica - 求解一个变量的混合方程

wolfram-mathematica - 如何在使用 DeleteCases 时删除额外的 {}

wolfram-mathematica - Mathematica 的 linux 前端中\[Conjugate] 字体错误的解决方法