Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing the text in a dw 'Text Object', from syntax in a window

Status
Not open for further replies.

Cardioes

Programmer
Jan 16, 2012
11
0
0
US
Greetings Tek-tips,


I am curious if there is a way to modify the text in a 'Text Object', that is on a datawindow, from syntax in a window.

For example: 't_1' on the datawindow displays "First Name". I want to place the datawindow into a window, and change the 'text' to something else.
 
You can use either dot notation of a modify statement.

Dot notation looks like this:
Code:
dw_1.object.t_1.text = 'whatever'

Modify is like this
Code:
string ls_mod, ls_text
ls_text = 'whatever' 
ls_mod = "t_1.text = '" + ls_text + "'"
dw_1.modify(ls_mod)

The modify method returns an empty string if successful or an error message if not. The error message will tell you the position within the modify string which is problematic.

Matt

"Nature forges everything on the anvil of time"
 
Matt,

Thank you very much for your assistance.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top