Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Scroll tablelayout
sortDirectionASC
repeatTableHeadersdefaultstyle
widths17%, 15%, 14%, 13%, 41%
style
sortByColumn1
sortEnabledfalse
cellHighlightingtrue

NameFlag argumentsArgument typeExclusive toComments
selChange1stringSpecify the script to be called when the selection state of items in the list view changes.
checkChange1stringSpecify the script to be called when the checked state of items in the list view changes.

Return value

void

Examples

Code Block
languagetext
// Demonstrate usage of a List View User Control

...


int $windowID, $listViewID, $formID;

...


 

...

// Destroy window if it already exists

...


if( `windowExists "ListViewTesting"` == true )

...


{

...


     destroyWindow "ListViewTesting";

...


} 

...

// Create window and list view

...


$windowID = `createWindow "ListViewTesting"`;

...


$listViewID = `createListView $windowID -form $formID -checkBoxes`;

...


 

...

// Create the columnsstring $columns[3];

...


int $widths[3];

...


$columns[0] = "Name";

...


$columns[1] = "Age";

...


$columns[2] = "Gender";

...


$widths[0] = 150; 

...


$widths[1] = 50;

...


$widths[2] = 100;

...


setListViewColumns $listViewID $columns $widths;

...


 

...

// Set the script we want to get called when the selection state of 

...

// one of the items changes

...


setListViewHandler -selChange "MySelChangeHandler";

...


 

...

// Save the value of the list control so we can get it our handler script

...


setGlobalVar "MyListViewID" $listViewID;

...


//

...


///////////////////////////////////////

...


// In "MySelChangeHandler. This script must exist under one

...


// of your script directories.

...


int $listViewID = `getGlobalIntVar "MyListViewID"`;

...


print( `getListViewSelItems $listViewID` );

Additional information

Related commands

...