Share this page

# Example: sapgui_tree_is_checkbox_selected

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 25.1-25.3 Function Reference 25.1-25.3 All View Local Help Center View Online Help Center Version: