gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-04 08:45:43 24 4
gpt4 key购买 nike

抱歉,我在这里的第一个问题可能是微不足道的,但我刚刚意识到我不知道如何在 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/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com