Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

DwtSTextReplace(3Dwt)

Name

DwtSTextReplace − Replaces a portion of the current text string in the simple text widget or inserts a new substring in the text. 

Syntax

void DwtSTextReplace(widget, from_pos, to_pos, value)
     Widget widget;
     int from_pos, to_pos;
     DwtCompString value;

Arguments

widgetSpecifies the ID of the simple text widget whose text string you want to replace. 

from_posSpecifies the beginning character position within the text string marking the text being replaced. 

to_posSpecifies the last character position within the text string marking the text being replaced. 

valueSpecifies the text to replace part of the current text in the simple text widget. 

Description

The DwtSTextReplace function replaces part of the text string in the simple text widget.  Within the window, the positions are numbered starting from 0 and increasing sequentially.  For example, to replace the second and third characters in the string, from_pos should be 1 and to_pos should be 3.  To insert a string after the fourth character, from_pos and to_pos should both be 4. 

See Also

DwtSText (3Dwt), DwtSTextGetString (3Dwt), DwtSTextGetEditable (3Dwt), DwtSTextSetEditable (3Dwt), DwtSTextGetMaxLength (3Dwt), DwtSTextSetMaxLength (3Dwt), DwtSTextSetSelection (3Dwt), DwtSTextClearSelection (3Dwt), DwtSTextGetSelection (3Dwt)
Guide to the XUI Toolkit: C Language Binding
Guide to the XUI Toolkit Intrinsics: C Language Binding

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026