怎样设置EXCEL默许行高为20,并且依据内容控制EXCEL自动换行和行高呢?
如下方法:
“开始”选项卡,点击自动换行即可。如果自己限定了单元格式高度的会例外。如下图所示:
“开始”选项卡,点击“格式”中的“自动调整行高”即可。如下图所示:
Package com.riaidea.text
Class public class RichTextField
Inheritance RichTextField flash.display.Sprite
RichTextField是一个基于TextField的图文混编的组件。
众所周知,TextField可以用html的方式来插入图片,但无法有效控制图片的位置且不能实时编辑。RichTextField可以满足这方面的需求。
RichTextField有如下特性:
在文本末尾追加文本和显示元素。
在文本任何位置替换(删除)文本和显示元素。
支持HTML文本和显示元素的混排。
可动态设置RichTextField的尺寸大小。
可导入和导出XML格式的文本框内容。
Example
下面的例子演示了RichTextField基本使用方法:
var rtf:RichTextField = new RichTextField();
rtf.x = 10;
rtf.y = 10;
addChild(rtf);
//设置rtf的尺寸大小
rtf.setSize(500, 400);
//设置rtf的类型
rtf.type = RichTextField.INPUT;
//设置rtf的默认文本格式
rtf.defaultTextFormat = new TextFormat("Arial", 12, 0x000000);
//追加文本和显示元素到rtf中
rtf.append("Hello, World!", [ { index:5, src:SpriteClassA }, { index:13, src:SpriteClassB } ]);
//替换指定位置的内容为新的文本和显示元素
rtf.replace(8, 13, "世界", [ { src:SpriteClassC } ]);
下面是一个RichTextField的内容的XML例子,你可以使用importXML()来导入具有这样格式的XML内容,或用exportXML()导出这样的XML内容方便保存和传输:
Hello, World!
Public Properties
Property
Defined by
autoScroll : Boolean
一个布尔值,指示当追加内容到RichTextField后是否自动滚动到最底部。
RichTextField
caretIndex : int
指定鼠标指针的位置。
RichTextField
content : String
[read-only] 返回文本字段中的内容(包括显示元素的占位符)。
RichTextField
contentLength : int
[read-only] 返回文字字段中的内容长度(包括显示元素的占位符)。
RichTextField
defaultTextFormat : TextFormat
指定文本字段的默认文本格式。
RichTextField
html : Boolean
一个布尔值,指示文本字段是否以HTML形式插入文本。
RichTextField
lineHeight : int
指示文本字段的显示元素的行高(最大高度)。
RichTextField
numSprites : int
[read-only] 返回RichTextField中显示元素的数量。
RichTextField
placeholderMarginH : int
[write-only] 指示显示元素占位符的水平边距。
RichTextField
placeholderMarginV : int
[write-only] 指示显示元素占位符的垂直边距。
RichTextField
text : String
[read-only] 返回文本字段中的文本(不包括显示元素的占位符)。
RichTextField
textfield : TextField
[read-only] TextField实例。
RichTextField
textLength : int
[read-only] 返回文字字段中的文本长度(不包括显示元素的占位符)。
RichTextField
type : String
指示RichTextField的类型。
RichTextField
viewHeight : Number
[read-only] 返回RichTextField对象的可见高度。
RichTextField
viewWidth : Number
[read-only] 返回RichTextField对象的可见宽度。
RichTextField
Public Methods
Method
Defined by
RichTextField()
构造函数。
RichTextField
addPlugin(plugin:IRTFPlugin):void
为RichTextField增加插件。
RichTextField
append(newText:String, newSprites:Array = null, autoWordWrap:Boolean = false, format:TextFormat = null):void
追加newText参数指定的文本和newSprites参数指定的显示元素到文本字段的末尾。
RichTextField
clear():void
清除所有文本和显示元素。
RichTextField
exportXML():XML
导出XML格式的RichTextField的文本和显示元素内容。
RichTextField
getSprite(index:int):DisplayObject
返回由参数index指定的索引位置的显示元素。
RichTextField
importXML(data:XML):void
导入指定XML格式的文本和显示元素内容。
RichTextField
insertSprite(newSprite:Object, index:int = -1, autoRender:Boolean = true, cache:Boolean = false):void
在参数index指定的索引位置(从零开始)插入由newSprite参数指定的显示元素。
RichTextField
isSpriteAt(index:int):Boolean
指示index参数指定的索引位置上是否为显示元素。
RichTextField
replace(startIndex:int, endIndex:int, newText:String, newSprites:Array = null):void
使用newText和newSprites参数的内容替换startIndex和endIndex参数指定的位置之间的内容。
RichTextField
setSize(width:Number, height:Number):void
设置RichTextField的尺寸大小(长和宽)。
RichTextField
Public Constants
Constant
Defined by
DYNAMIC : String = "dynamic"
[static] 用于指定动态类型的RichTextField。
RichTextField
INPUT : String = "input"
[static] 用于指定输入类型的RichTextField。
RichTextField
version : String = "2.0.2"
[static] RichTextField的版本号。
RichTextField
Property detail
autoScroll property
public var autoScroll:Boolean
一个布尔值,指示当追加内容到RichTextField后是否自动滚动到最底部。
The default value is true.
caretIndex property
caretIndex:int [read-write]
指定鼠标指针的位置。
Implementation
public function get caretIndex():int
public function set caretIndex(value:int):void
content property
content:String [read-only]
返回文本字段中的内容(包括显示元素的占位符)。
Implementation
public function get content():String
contentLength property
contentLength:int [read-only]
返回文字字段中的内容长度(包括显示元素的占位符)。
Implementation
public function get contentLength():int
defaultTextFormat property
defaultTextFormat:TextFormat [read-write]
指定文本字段的默认文本格式。
Implementation
public function get defaultTextFormat():TextFormat
public function set defaultTextFormat(value:TextFormat):void
html property
public var html:Boolean
一个布尔值,指示文本字段是否以HTML形式插入文本。
The default value is false.
lineHeight property
public var lineHeight:int
指示文本字段的显示元素的行高(最大高度)。
The default value is 0.
numSprites property
numSprites:int [read-only]
返回RichTextField中显示元素的数量。
Implementation
public function get numSprites():int
placeholderMarginH property
placeholderMarginH:int [write-only]
指示显示元素占位符的水平边距。
The default value is 1.
Implementation
public function set placeholderMarginH(value:int):void
placeholderMarginV property
placeholderMarginV:int [write-only]
指示显示元素占位符的垂直边距。
The default value is 0.
Implementation
public function set placeholderMarginV(value:int):void
text property
text:String [read-only]
返回文本字段中的文本(不包括显示元素的占位符)。
Implementation
public function get text():String
textfield property
textfield:TextField [read-only]
TextField实例。
Implementation
public function get textfield():TextField
textLength property
textLength:int [read-only]
返回文字字段中的文本长度(不包括显示元素的占位符)。
Implementation
public function get textLength():int
type property
type:String [read-write]
指示RichTextField的类型。
The default value is RichTextField.DYNAMIC.
Implementation
public function get type():String
public function set type(value:String):void
viewHeight property
viewHeight:Number [read-only]
返回RichTextField对象的可见高度。
Implementation
public function get viewHeight():Number
viewWidth property
viewWidth:Number [read-only]
返回RichTextField对象的可见宽度。
Implementation
public function get viewWidth():Number
Constructor detail
RichTextField () constructor
public function RichTextField()
构造函数。
Method detail
addPlugin () method
public function addPlugin(plugin:IRTFPlugin):void
为RichTextField增加插件。
Parameters
plugin:IRTFPlugin — 要增加的插件。
append () method
public function append(newText:String, newSprites:Array = null, autoWordWrap:Boolean = false, format:TextFormat = null):void
追加newText参数指定的文本和newSprites参数指定的显示元素到文本字段的末尾。
Parameters
newText:String — 要追加的新文本。
newSprites:Array (default = null) — 要追加的显示元素数组,每个元素包含src和index两个属性,如:{src:sprite, index:1}。
autoWordWrap:Boolean (default = false) — 指示是否自动换行。
format:TextFormat (default = null) — 应用于追加的新文本的格式。
clear () method
public function clear():void
清除所有文本和显示元素。
exportXML () method
public function exportXML():XML
导出XML格式的RichTextField的文本和显示元素内容。
Returns
XML
getSprite () method
public function getSprite(index:int):DisplayObject
返回由参数index指定的索引位置的显示元素。
Parameters
index:int
Returns
DisplayObject
importXML () method
public function importXML(data:XML):void
导入指定XML格式的文本和显示元素内容。
Parameters
data:XML — 具有指定格式的XML内容。
insertSprite () method
public function insertSprite(newSprite:Object, index:int = -1, autoRender:Boolean = true, cache:Boolean = false):void
在参数index指定的索引位置(从零开始)插入由newSprite参数指定的显示元素。
Parameters
newSprite:Object — 要插入的显示元素。其格式包含src和index两个属性,如:{src:sprite, index:1}。
index:int (default = -1) — 要插入的显示元素的索引位置。
autoRender:Boolean (default = true) — 指示是否自动渲染插入的显示元素。
cache:Boolean (default = false) — 指示是否对显示元素使用缓存。
isSpriteAt () method
public function isSpriteAt(index:int):Boolean
指示index参数指定的索引位置上是否为显示元素。
Parameters
index:int — 指定的索引位置。
Returns
Boolean
replace () method
public function replace(startIndex:int, endIndex:int, newText:String, newSprites:Array = null):void
使用newText和newSprites参数的内容替换startIndex和endIndex参数指定的位置之间的内容。
Parameters
startIndex:int — 要替换的起始位置。
endIndex:int — 要替换的末位位置。
newText:String — 要替换的新文本。
newSprites:Array (default = null) — 要替换的显示元素数组,每个元素包含src和index两个属性,如:{src:sprite, index:1}。
setSize () method
public function setSize(width:Number, height:Number):void
设置RichTextField的尺寸大小(长和宽)。
Parameters
width:Number — 宽度。
height:Number — 高度。
Constant detail
DYNAMIC constant
public static const DYNAMIC:String = "dynamic"
用于指定动态类型的RichTextField。
INPUT constant
public static const INPUT:String = "input"
用于指定输入类型的RichTextField。
version constant
public static const version:String = "2.0.2"
RichTextField的版本号。
您提出的是二个问题。
1、行高问题。将表的行号刷黑,格式——行——行高——自己设置理想数字。
2、全选表格——右键——设置单元格格式——对齐——自动换行——确定。
1、将所有分隔符替换为软回车:
点击菜单:编辑→替换
在查找内容内输入分隔符 (如“,”等)
在替换处输入软回车符:按Alt键别放,依次输入小键盘上的数字键1和0,松开Alt键(此时在输入位置看不出变化,但内容已输入)。
进行全部替换
2、点设置单元格格式-对齐-自动换行
怎样设置EXCEL默许行高为20,并且依据内容控制EXCEL自动换行和行高呢?视频
相关评论:
汲芳步1、新建一个Excel工作表,设置好行高,然后保存为模板;2、把这个模块设置为默认模板,即用自己设计好的默认行高文件保存到c:windowsDocumentsandSettings当前用户名ApplicationDataMicrosoftExcelXLSTART文件夹下;3、设置好以后,后面在打开Excel表格时就会自动调用该文档模式,从而实现Excel默认行高为设置好的参数...
汲芳步1. 打开Excel表格,将鼠标放在需要调整的行号上。2. 鼠标点击行号之间的分隔线,然后向下或向上拖动,以调整行高。二、自动换行和适应列宽 如果单元格内容较多,可以选择“自动换行”功能,这样内容会自动填充到多行中。此外,也可以尝试自动调整列宽来适应内容。通过选择列,然后双击列边缘的边界...
汲芳步1. 选中整个工作表(点A列和1行交界的那个格子) 2. 菜单-格式-行-行高,输入20即可。继续补充:貌似没有好的办法,我想到的是改变默认字体大小,这样行高会变化:菜单-选项-常规,里面的“标准字体”,改大小即可。Microsoft Excel是微软公司的办公软件Microsoft office的组件之一,是由Microsoft为W...
汲芳步方法1.选中表格点击“开始”,选择“单元格”之后,选择“格式”,在列表中点击“自动调整行高”。方法2.还可以选中表格,然后把光标移动到,行缝隙之间,当鼠标变为双向箭头的形状时,鼠标左键双击 4. Excel怎样自动调整行高 方法一:选中需要调整行高列宽的单元格,将光标移动到两列之间,光标呈两个方...
汲芳步2.点击工具栏中的【格式】。3.点击【行高】。4.输入行高的字符大小。5.点击【确定】后就修改成功了。总结:Excel的行高和列宽在格式中,点击行高或者列宽输入字符大小就能进行调整。特别提醒:通过以上关于excel行高怎么设置 excel行高怎样设置内容介绍后,相信大家会对excel行高怎么设置 excel行高怎样设置有...
汲芳步例图 第一步,先选中第一行(如图1);图1 第二步,在选中的这行(灰色显示的)任意位置点鼠标右键,然后选择【行高】(如图2);图2 第三步,在弹出的行高设置中填写【25】(如图3);图3 第四步,确定后,就完成行高的设置了(如图4)。图4 Excel中如何调整行高,你学会了吗?是不是很...
汲芳步选中所有行,设置行高为20。对内容多的行,鼠标移到下线左端,变为双箭头后,双击,自动调整行高。
汲芳步在Excel中,精确设置行高为1厘米,列宽为2厘米的操作简单易行。以下是详细的步骤:首先,打开需要编辑的Excel工作表,选择你想要调整的行或列。在“开始”选项卡的“单元格”组中,点击“格式”选项,然后选择“行高”和“列宽”功能(如图所示)。在弹出的对话框中,直接输入你所需的尺寸,即1厘米和2...
汲芳步Excel的行高是指Excel表格中每一行的高度,行高的设置对表格的排版和展示都有影响。Excel中行高的默认值为15,这意味着每一行都有一个15个像素的高度。二、如何调整Excel表格中的行高?调整Excel表格的行高非常简单。可以通过以下步骤来进行调整:1. 首先选中需要调整的行(可以选中多行)。2. 在Excel的...
汲芳步您可以使用以下步骤快速设置Excel表格中的行高:1. 选择要调整行高的区域。2. 在“开始”选项卡上,单击“行高”按钮。3. 输入您想要的行高值。4. 单击“确定”按钮以保存更改。