500*_*500 1 coding-style wolfram-mathematica alignment
考虑以下因素:
Manipulate[
If[Intersection[Row1, Row2] == {},
Style[Plus @@ {Plus @@ Row1, Plus @@ Row2}, Bold, 20],
"Error"],
{{Row1, {1}}, {1, 2, 3, 4, 5}, ControlType -> TogglerBar},
{{Row2, {2}}, {1, 2, 3, 4, 5}, ControlType -> TogglerBar}
]
Run Code Online (Sandbox Code Playgroud)

- 我希望"3"能够居中,是否可能?
Manipulate有自己的Alignment选项.你可以看看它是否适合你:
Manipulate[
If[Intersection[Row1,Row2]=={},Style[Plus@@{Plus@@Row1,Plus@@Row2},Bold,20],"Error"],
{{Row1,{1}},{1,2,3,4,5},ControlType->TogglerBar},
{{Row2,{2}},{1,2,3,4,5},ControlType->TogglerBar},
Alignment->Center
]
Run Code Online (Sandbox Code Playgroud)

| 归档时间: |
|
| 查看次数: |
194 次 |
| 最近记录: |