SetFocusControlByName

<< Click to Display Table of Contents >>

Navigation:  Interactive Objects >

SetFocusControlByName

Previous pageReturn to chapter overviewNext page

This method can only be used, if a template containing controls (i.e. Interactive Objects) has been dumped into the VPE Document. In dycodoc, you can assign a name to each object. The name can be supplied to this method in order to set the focus to a named control.

method boolean VPE.SetFocusControlByName(

TVPETemplate objTemplate,

string Name

)

TVPETemplate objTemplate

Template Object of the template which was dumped into the VPE Document

string Name

the name of the control as assigned in dycodoc

Returns:

Value

Description

True

success, the control was found and the focus could be set

False

otherwise, for example if every object - or the whole document - is disabled, or the object which currently owns the focus did not allow to remove the focus

Remarks:

If the parameter name is NULL or empty (""), the focus is removed from the control currently having the focus.

Example:

// Set the focus on the control named "Street" in dycodoc:

Doc.SetFocusControlByName(objTemplate, "Street")

 

See also:

"Interactive Documents" in the Programmer's Manual.