IBM Doors DXL: ListView : Callback functions, event listeners on checkboxes, selections, deselections and click


There are lots of event to react on listView events, but they are not clearly defined in the language reference or the DXL Manual.


This will show the most common events working with listView DBE elements.


void doSelect(DBE dbe, int idx)
// Auswahl mit Einfachklick

void doDeselect(DBE dbe, int idx)
// Element verliert selektion (evtl. durch anderes)

void doActivate(DBE dbe, int idx)
// Doppelklick / double click

void checkBoxReact(DBE lv, int i)
    string s = get(lv, i)
    bool b = getCheck(lv, i)
    if ( b ) 
	   int j=0;
       //infoBox(s " was selected")
       //infoBox(s " was deselected")

And this is how the ListView has been declared:

DB mainDialog=create("Select Baseline to compare");
DBE listViewBaselines = listView(mainDialog, listViewOptionCheckboxes,360,10,baselineEntries);

// The first callback fires when an option is selected (a single click); 
// the second fires when an option is deselected (a side effect of a single click on another item); 
// the third fires when an item is activated (a double click).
set(listViewBaselines, checkBoxReact);
DBE publishButton=apply(mainDialog, "Compare", compareButtonCallBack);
realize mainDialog;
insertColumn(listViewBaselines, 0, "Baseline", 80, iconNone);
insertColumn(listViewBaselines, 1, "Description", 140, iconNone);
insertColumn(listViewBaselines, 2, "Increment", 140, iconNone);

show mainDialog;

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert

Diese Website verwendet Akismet, um Spam zu reduzieren. Erfahre mehr darüber, wie deine Kommentardaten verarbeitet werden.