Share this page

# sapgui_tree_is_checkbox_selected

Tree Functions

Checks if box is selected.

    int sapgui_tree_is_checkbox_selected( const char *description, const char *treeID, const char *nodeKey, const char *itemName, [args,] LAST ) ;

description | User entered text to aid in understanding script
treeID | Object ID Strings
nodeKey | Object ID Strings
itemName | Object ID Strings
args | Optional Arguments, often including Dynamic Tree Node Keys.
LAST | A marker indicating the end of the argument list. Not required if Optional Arguments are used.

The sapgui_tree_is_checkbox_selected verification function applies to a checkbox in a tree control. It returns true if the box is selected or false if the box is cleared.

## Return Values

This function returns True (-1) or False (0).

## Parameterization

You can parameterize all string (char type) arguments.

## Example

The following example uses sapgui_tree_is_checkbox_selected to confirm the success of the select checkbox actions.

    int isSelected;

    sapgui_tree_set_checkbox("Child1 Col. 1, Column3, True",

        "usr/cntlTREE_CONTAINER/shellcont/shell",

        "Child1",

        "Column3",

        "True", LAST );

    isSelected = sapgui_tree_is_checkbox_selected

        ( "Check Status",

        "usr/cntlTREE_CONTAINER/shellcont/shell",

        "Child1",

        "Column3",

        LAST );

    // Output is "Selected"

    if (isSelected)

            lr_output_message("Selected");

        else

            lr_output_message("Not Selected");

    // Now clear and try again

    sapgui_tree_set_checkbox("Child1 Col. 1, Column3, True",

        "usr/cntlTREE_CONTAINER/shellcont/shell",

        "Child1",

        "Column3",

        "False", LAST );

    isSelected = sapgui_tree_is_checkbox_selected

        ( "Check Status",

        "usr/cntlTREE_CONTAINER/shellcont/shell",

        "Child1",

        "Column3", LAST );

    // Output is "Not Selected"

    if (isSelected)

        lr_output_message("Selected");

    else

        lr_output_message("Not Selected");

Tips to improve your search results... VuGen Function Reference Version 26.1 Function Reference 26.1 All View Local Help Center View Online Help Center Version: