[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference bulova::decw_jan-89_to_nov-90

Title:DECWINDOWS 26-JAN-89 to 29-NOV-90
Notice:See 1639.0 for VMS V5.3 kit; 2043.0 for 5.4 IFT kit
Moderator:STAR::VATNE
Created:Mon Oct 30 1989
Last Modified:Mon Dec 31 1990
Last Successful Update:Fri Jun 06 1997
Number of topics:3726
Total number of notes:19516

2613.0. "update item_number? of a ListBox" by ASDS::SIVAKUMAR () Fri Apr 13 1990 17:06

    
    How to update the item_number of a list box
    
    a listbox and a simpletext involved. when a simpletext entered,
    the entry in the listbox gets highlighted. but the item_number
    (which just highlighted) is not updated in the widget structure.
    
    the following is the code used.
    ----------------------------------------------------------------
    static VoidProc HighLightList(widget, tag, reason)
    Widget widget;
    int *tag;
    DwtListBoxCallbackStruct *reason;
    {
       DwtCompString list_string;
       char         *text_string;
       int          i;
                                           
       switch (*tag)
       {
            case (MIB_CLASS_LIST) :
            text_string = DwtSTextGetString(widgets[MIB_CLASS_TEXT]);
            i = strlen(text_string);
            if (text_string[i - 1] == '\n')
                text_string[i - 1] = '\0';
           list_string = DwtLatin1String(text_string);
            DwtListBoxDeselectAllItems(widgets[MIB_CLASS_LIST]);
            DwtListBoxSetItem(widgets[MIB_CLASS_LIST], list_string);
            DwtListBoxSelectItem(widgets[MIB_CLASS_LIST], list_string, FALSE);
    /*      reason->item_number =    */
            MIBVariableWindow(widgets[MIB_CLASS_LIST], tag, reason );
    	    break;
    	........
    	.......  etc
    
       }
    
    
    	thanks in advance,
    	sivakumar
    
                                                                          
              
T.RTitleUserPersonal
Name
DateLines