VpeSetFocusControlByName

<< Click to Display Table of Contents >>

Navigation:  Interactive Objects >

VpeSetFocusControlByName

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.

int VpeSetFocusControlByName(

VpeHandle hDoc,

VpeHandle hTemplate,

LPCSTR name

)

VpeHandle hDoc

Document Handle

VpeHandle hTemplate

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

LPCSTR 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:

VpeSetFocusControlByName(hDoc, hTemplate, "Street");

 

See Also:

"Interactive Documents" in the Programmer's Manual.