Special dialog with an image list.
Special dialog with an image list.
Name | Type | Default | Description |
Return | int | -1199 : Canceled by user -1 : Error >=0 : 0-based number of selected line |
|
title | String or char* | - | title of dialog |
info | String or char* | - | description above list |
selectStmt | String or char* | - | sql or xmlquery statement to load key-values pairs , may be empty (in this case the pairs are taken from the string lists. The statement must return five columns (int, image, string, string, string) for ID, image, name, type and state. Image must be of type BLOB for database connection, and must contain a complete path to the image if you using XML or SOAP. |
paths, names, types, states | StringList | 0 | Lists to fill in the dialog list (only used if selectStmt is empty) |
out_int | int* | 0 | On successful return this list contains the selected IDs (or, in case of list input, the 1-based line numbers) |
out_name, out_type, out_state | String or char* | 0 | On successful return these parameters contain the selected row values |
int main () { StringList paths = stringlist::alloc (); StringList names = stringlist::alloc (); StringList types = stringlist::alloc (); StringList states = stringlist::alloc (); char str[256]; long rid; char rname[256]; char rtype[256]; char rstate[256]; int result; int i;
for (i = 0; i < 10; i++) { sprintf (str, "$DESKTOP/Bilder/%d.png", i+1); stringlist::append (paths, str);
sprintf (str, "Name %d", i+1); stringlist::append (names, str);
sprintf (str, "Typ %d", i+1);
stringlist::append (types, str); sprintf (str, "Status %d", i+1);
stringlist::append (states, str); }
result = retint_dialog ( "ttt", "File associations for ttt", "", paths, names, types, states, &rid, rname, rtype, rstate);
wlog ("", "Result %d\n", result); if (result >= 0) { wlog ("", "\tID : %d\n", rid); wlog ("", "\tName : '%s'\n", rname); wlog ("", "\tType : '%s'\n", rtype); wlog ("", "\tState : '%s'\n", rstate); }
return 0; }
Alphabetic index HTML hierarchy of classes or Java