RichTextBox.SelectedRtf 属性

电脑杂谈  发布时间:2019-11-16 20:02:20  来源:网络整理

richtextbox rtf_richtextbox_richtextbox 格式保存rtf

获取或修改控件中当前选取的 RTF 格式的格式化文本。Gets or sets the currently selected rich text format (RTF) formatted text in the control.

public:
 property System::String ^ SelectedRtf { System::String ^ get(); void set(System::String ^ value); };
[System.ComponentModel.Browsable(false)]
public string SelectedRtf { get; set; }
member this.SelectedRtf : string with get, set
Public Property SelectedRtf As String

控件中选取的 RTF 文本。The selected RTF text in the control.

属性

BrowsableAttribute

此属性使您无法获得控件中选取的文本,包括 RTF 格式代码。This property enables you to obtain the selected text in the control, including the RTF formatting codes. 您可以使用此属性从控件复制文本,使用格式修改完成richtextbox rtf,并将文本粘贴到接受 RTF 格式文本的其它应用程序(例如 Microsoft Word 和 Windows 写字板)中。You can use this property to copy text from your control, complete with formatting, and paste the text in other applications that accept RTF formatted text, such as Microsoft Word and Windows WordPad. 若要获取所选文本,而不使用 RTF 格式代码richtextbox rtf,请使用 SelectedText 属性。To get the selected text, without RTF formatting codes, use the SelectedText property.

如果当前未选取任何文本,则在插入点处插入此属性中选定的文本。If no text is currently selected, the text specified in this property is inserted at the insertion point. 如果选取文本,则分配给此属性的任何文本都将更换指定文本。If text is selected, any text assigned to this property replaces the selected text.


本文来自电脑杂谈,转载请注明本文网址:
https://www.pc-fly.com/a/jisuanjixue/article-130284-1.html

    相关阅读
      发表评论  请自觉遵守互联网相关的政策法规,严禁发布、暴力、反动的言论

      • 王盼红
        王盼红

        是个男人就不会像这样的想法

      • 王清伟
        王清伟

        更新完游戏都进不了

      • 隋恭帝
        隋恭帝

        而且当初也是他求你

      热点图片
      拼命载入中...