Edit Box(编辑框) 自定义标记显示类型,是用来在版面中直接创建一个可编辑框,用户可以在其中更改自定义标记值,自定义标记值将更新原始自定义标记和随后其他例子中的自定义标记。自定义标记值可以是数字或者文本。在下面的步骤中,我们将介绍如何以编辑框的形式查看标记、如何修改标记值、如何调整编辑框的宽度。
1. | 请从File(文件)标签→Open(打开)步骤来到Tutorial Sample Data(教程样本数据)文件夹。 |
2. | 请打开EditBoxTutorial.fey版面。 |
该版面的顶端有一个表格,该表格包含了来自"Lymphs"门的“# of Lymphs”标记、一个用户定义的除法因子和一个针对“# of Lymphs”除以该除法因子的自定义标记值(图T5.44)。该值全依赖于之前创建的、为本教程使用的Custom Tokens(自定义标记)。在接下来的步骤中,我们将调整除法因子标记为一个编辑框,这样的话,它就将动态更新其他标记中的标记值。
Figure T5.44 - The EditBoxTutorial.fey layout. The Division factor will be adjusted to be an editable box within the layout in the tutorial.
3. | 双击Division Factor列的标记值"5.00"。 |
4. | 从Display(显示) 项目类别中选择Edit Box(编辑框)→Display type(显示类型)下拉菜单(图T5.45)。 |
5. | 点击OK。 |
Figure T5.45 - Choosing the Edit box custom token display type.
6. | 点击版面中的文本框,将其选中。 |
注意:现在,Division Factor value(除法因子值)已被蓝色框围绕(图T5.46)。蓝色的框表示针对标记值的可编辑的字段。
Figure T5.46- The token display type for the division factor is now an editable box denoted by the blue box surrounding the token value.
7. | 从编辑框中删除值"5"。 |
8. | 输入"10"到其中。 |
注意:此时,"Lymphs / " 列文件头的标记值已经改变,且表头下面单元格中的标记值也已改变。在编辑框中,依赖于此标记的任何标记都将随着其值的改变而实时更新。
您同样也会注意到,division factor(除法因子)编辑框的大小远远大于表格。我们将对编辑框进行格式化,让其与表格更匹配(图T5.47)。
Figure T5.47 - The value in the Edit box has been changed to 10 thus modifying the original Custom Token value and updating any other token or displayed location in the layout.
9. | 在表格中的编辑框上点击右键。 |
10. | 选择Format token(格式化标记)。 |
11. | 在Display(显示)项目类别下的Width(宽度)对话框处输入"10"(图T5.48)。 |
12. | 点击OK。 |
Figure T5.48 - Adjusting the width of the Edit box.
13. | 点击文本框,将其选中。 |
注意:此时编辑框大小减小到宽度为10,因此正确的匹配了表格单元格的大小(图T5.49)。
Figure T5.49 - The Edit box has been adjusted to a width of 10 to fit within the table cell.