Article # 216, added by Geoworks, historical record
| first | previous | index | next | last |

How do I get multiple columns in my GenDynamicList?




If you are using a GenDynamicList object and would like to have the
appearance of multiple columns, and you are using the Nokia 9000
Communicator SDK, you can use the CreateVisMonikerLine() function to
achieve this. Here is a sample of how that is done:

    optr             moniker;
    VisMonikerColumn colTable[2];
    char             str1[10] = "First";
    char             str2[10] = "Second";

    colTable[0].VMC_width = strlen( str1 );
    colTable[0].VMC_ptr = str1;
    colTable[0].VMC_just = J_LEFT;
    colTable[0].VMC_style = TS_PLAIN;
    colTable[0].VMC_border = CB_LEFT;
    colTable[1].VMC_width = strlen( str2 );
    colTable[1].VMC_ptr = str2;
    colTable[1].VMC_just = J_LEFT;
    colTable[1].VMC_style = TS_PLAIN;
    colTable[1].VMC_border = CB_LEFT;
    moniker = CreateVisMonikerLine( 12, FID_RESPONDER, 2, colTable );

    /*
     * You can now use moniker as a parameter to the GenDynamicList
     * in the MSG_GEN_DYNAMIC_LIST_REPLACE_ITEM_MONIKER_OPTR.
     * You would then free the moniker using MemFree, like so:
     */
    MemFree( OptrToHandle( moniker ) );