Skip to content

TLB_EXPAND_TO

This command expands all entries up to a certain ID.

Syntax

leo-grammar
CC "AdoScript" TLB_EXPAND_TO id:intValue [ parentid:intValue ]

# --> RESULT ecode:intValue
CC "AdoScript" TLB_EXPAND_TO id:intValue [ parentid:intValue ]

# --> RESULT ecode:intValue

Parameters

  • id (intValue) - specifies the entry to which we want to expand.
  • parentid (intValue, optional) - id of the parent

Returns

  • ecode (intValue) - as follows 0 = no error occured, 1 = user canceled dialog, 2 = you have to call TLB_CREATE before calling this function, 3 = an argument is missing, 4 = you passed an invalid ID

Details

See Also

TLB_ADD_BUTTON
TLB_CREATE
TLB_EXPAND
TLB_EXPAND_ALL
TLB_INSERT
TLB_REMOVE
TLB_SELECT
TLB_SELECT_ALL
TLB_SHOW

Examples

asc
# create the main TreeListBox with all its parameters
CC "AdoScript" TLB_CREATE title:"My title" oktext:"Close" canceltext:"No way!"
        boxtext:"These are my entries" no-help:1 button-w:60
        max-w:500 max-h:367 min-w:200 min-h:150 checklistbox:0

# insert some entries (as you like - ID should be unique)
CC "AdoScript" TLB_INSERT id:1 text:"Do this" is-parent:1
CC "AdoScript" TLB_INSERT id:2 text:"Do that" 
CC "AdoScript" TLB_INSERT id:3 parentid:1 text:"here"  
CC "AdoScript" TLB_INSERT id:4 parentid:3 text:"Now I am here"


CC "AdoScript" TLB_EXPAND_TO id:4

# and finally show it
CC "AdoScript" TLB_SHOW
IF (ecode = 0) {
    CC "AdoScript" INFOBOX ("Selected ids: " + selectedids + "\n" +
                            "You pushed the following button: " + endbutton)
} ELSE {
    CC "AdoScript" INFOBOX ("You cancelled the dialog!")
}
# create the main TreeListBox with all its parameters
CC "AdoScript" TLB_CREATE title:"My title" oktext:"Close" canceltext:"No way!"
        boxtext:"These are my entries" no-help:1 button-w:60
        max-w:500 max-h:367 min-w:200 min-h:150 checklistbox:0

# insert some entries (as you like - ID should be unique)
CC "AdoScript" TLB_INSERT id:1 text:"Do this" is-parent:1
CC "AdoScript" TLB_INSERT id:2 text:"Do that" 
CC "AdoScript" TLB_INSERT id:3 parentid:1 text:"here"  
CC "AdoScript" TLB_INSERT id:4 parentid:3 text:"Now I am here"


CC "AdoScript" TLB_EXPAND_TO id:4

# and finally show it
CC "AdoScript" TLB_SHOW
IF (ecode = 0) {
    CC "AdoScript" INFOBOX ("Selected ids: " + selectedids + "\n" +
                            "You pushed the following button: " + endbutton)
} ELSE {
    CC "AdoScript" INFOBOX ("You cancelled the dialog!")
}

Versions and Changes

Available since ADOxx 1.3