Who's Online 
 
         
              
          245  user(s) are online (
144  user(s) are browsing 
Forums )
Members: 2
Guests: 243
 
BillE , 
VooDoo ,
    more...
  
       
      
     
   
                         
                         
                      
                
        
            
                        
            
                         
  
      
          Topic options 
                           
            
      
          View mode 
                        Newest First 
                 
                      
              
    
         
 
    
  
    
    
        
    
    
        
            
         
        
            columninfo(listbrowser)
         
        
            
                                    Posted on: 
2013/11/3 22:42 
                                  
                                    #1  
                             
         
     
    
                
                             Home away from home
 
                                     
                     
                                 
                                    
                    
                         
 
                    
                        Joined:  2006/11/30 18:43Last Login
                                :  10/31 23:45
                                                    From  Norway
                                                                            Group: 
                                  Registered Users                            
                                                
                                                                            
                                             
                                     
        
                        I'm having problems with columninfo. It worked before, but with latest listbrowser gadget updates, it lockes up the system. If i remove it then the program won't lockup the whole system. 
Any ideas????
How i set things up.
struct ColumnInfo ci [] =
 {
 
     {  110 ,  "        Movie name" ,  CIF_SORTABLE  },
     {    17 ,   "Year" ,  0  },
     {    70 ,   "      Genre" ,  0  },
     { - 1 , ( STRPTR )~ 0 , - 1  }
 };
 
          LAYOUT_AddChild ,  gadgets [ GID_LISTVIEW ] =  ListBrowserObject ,
                                              GA_ID , GID_LISTVIEW ,
                                              GA_RelVerify ,  TRUE ,
                                              GA_ReadOnly , FALSE ,
                                              LISTBROWSER_SortColumn ,  0  ,
                                              LISTBROWSER_Editable ,  FALSE ,
                                          //    LISTBROWSER_ColumnInfo, (ULONG)&ci,
                                              LISTBROWSER_ColumnTitles ,  TRUE ,
                                              LISTBROWSER_Labels , info_liste ,   
                                              LISTBROWSER_MakeVisible , 1 ,
                                              LISTBROWSER_ShowSelected ,  TRUE ,
                                              LISTBROWSER_HorizontalProp ,  FALSE , 
                                          ListBrowserEnd ,  
 
 
                        
             
            
                                    
 
     
    
                
                                
                X5000
            
                 
     
    
        
     
     
   
        
  
    
    
        
    
    
        
            
         
        
            Re: columninfo(listbrowser)
         
        
            
                                    Posted on: 
2013/11/4 1:23 
                                  
                                    #2  
                             
         
     
    
                
                             Home away from home
 
                                     
                     
                                 
                                    
                    
                         
 
                    
                        Joined:  2006/12/4 23:15Last Login
                                :  10/30 14:27
                                                                            Group: 
                                  Registered Users                            
                                                
                                                                            
                                             
                                     
        
                        Firstly you should always, always allocate ColumnInfo arrays with the AllocLBColumnInfo() function. Given that you are rolling your own, how is you column info allocated?  Is it declared static ? or on the stack ? If the latter then that's highly likely to be why it goes wrong. The last element should be {-1, NULL, 0 } but I doubt that would make a difference.  
                        
             
            
                                    
 
     
    
                
                                
                 
     
    
        
     
     
   
        
  
    
    
        
    
    
        
            
         
        
            Re: columninfo(listbrowser)
         
        
            
                                    Posted on: 
2013/11/4 8:52 
                                  
                                    #3  
                             
         
     
    
                
                             Just can't stay away
 
                                     
                     
                                 
                                    
                    
                         
 
                    
                        Joined:  2007/2/6 13:57Last Login
                                :  11/1 11:44
                                                    From  Donostia (SPAIN)
                                                                            Group: 
                                  Registered Users                            
                                                
                                                                            
                                             
                                     
        
                        @Antique
Hi, I use a listbrowser and columninfo like this, hope it helps:
columninfo  =  IListBrowser -> AllocLBColumnInfo ( 2 ,
                               LBCIA_Column , 0 ,  LBCIA_Title , " Keymap" ,  LBCIA_AutoSort , TRUE ,  LBCIA_Sortable , TRUE ,
                               LBCIA_Column , 1 ,  LBCIA_Title , " Description" ,
                              TAG_DONE );
 ..
 LAYOUT_AddChild ,  OBJ ( OBJ_LISTBROWSER ) =  IIntuition -> NewObject ( NULL ,  "listbrowser.gadget" ,
                         GA_ID ,                     OBJ_LISTBROWSER ,
                         LISTBROWSER_SortColumn ,    0 ,
                         LISTBROWSER_AutoFit ,       TRUE ,
                         LISTBROWSER_Labels ,       & listbrowser_list ,
                         LISTBROWSER_ColumnInfo ,    columninfo ,
                         LISTBROWSER_ColumnTitles ,  TRUE ,
                         LISTBROWSER_ShowSelected ,  TRUE ,
                         //LISTBROWSER_Selected,     -1,
                         LISTBROWSER_MinVisible ,    6 ,
                         LISTBROWSER_Striping ,      LBS_ROWS ,
                        TAG_DONE ),
 ..  
 
 
                        
             
            
                                    
 
     
    
                
                             
     
    
        
     
     
   
        
  
    
    
        
    
    
        
            
         
        
            Re: columninfo(listbrowser)
         
        
            
                                    Posted on: 
2013/11/15 22:54 
                                  
                                    #4  
                             
         
     
    
                
                             Home away from home
 
                                     
                     
                                 
                                    
                    
                         
 
                    
                        Joined:  2006/11/30 18:43Last Login
                                :  10/31 23:45
                                                    From  Norway
                                                                            Group: 
                                  Registered Users                            
                                                
                                                                            
                                             
                                     
        
                        @jabirulo Thanks guys. Sorted it out. just one more question. The columns are locked in their width. Possible to get it to resize the columns when user changes the size of the window?
                        
             
            
                                    
 
     
    
                
                                
                X5000
            
                 
     
    
        
     
     
   
        
  
    
    
        
    
    
        
            
         
        
            Re: columninfo(listbrowser)
         
        
            
                                    Posted on: 
2013/11/15 23:07 
                                  
                                    #5  
                             
         
     
    
                
                             Amigans Defender
 
                                     
                     
                                 
                                    
                    
                         
 
                    
                        Joined:  2006/11/26 23:16Last Login
                                :  2024/8/31 21:09
                                                    From  Canada
                                                                            Group: 
                                  Staff members  Moderators                            
                                                
                                                                            
                                             
                                     
        
                        @Antique You are passing a pointer to a pointer (&ci) which is wrong. If it worked before it was dumb luck.
                        
             
            
                                    
 
     
    
                
                                
                ExecSG Team Lead
            
                 
     
    
        
     
     
   
        
  
    
    
        
    
    
        
            
         
        
            Re: columninfo(listbrowser)
         
        
            
                                    Posted on: 
2013/11/15 23:33 
                                  
                                    #6  
                             
         
     
    
                
                             Home away from home
 
                                     
                     
                                 
                                    
                    
                         
 
                    
                        Joined:  2006/11/30 18:43Last Login
                                :  10/31 23:45
                                                    From  Norway
                                                                            Group: 
                                  Registered Users                            
                                                
                                                                            
                                             
                                     
        
                        @ssolie
It was my good karma i think. 
Have fixed that now. But still need help on the columns widht being locked even when resizing the window.
Looks kinda retarded when everything else changes size except the listbrowser columns.
 
                        
             
            
                                    
 
     
    
                
                                
                X5000
            
                 
     
    
        
     
     
   
        
  
    
    
        
    
    
        
            
         
        
            Re: columninfo(listbrowser)
         
        
            
                                    Posted on: 
2013/11/16 12:40 
                                  
                                    #7  
                             
         
     
    
                
                             Home away from home
 
                                     
                     
                                 
                                    
                    
                         
 
                    
                        Joined:  2006/12/4 23:15Last Login
                                :  10/30 14:27
                                                                            Group: 
                                  Registered Users                            
                                                
                                                                            
                                             
                                     
        
                        You are hard coding the widths int the ColumnInfo, try not doing that but setting LISTBROWSER_AutoFit instead. Then enable the horizontal scroll bar. You will need to resend the AutoFit tag everytime you change the list. 
                        
             
            
                                    
 
     
    
                
                                
                 
     
    
        
     
     
   
        
  
    
    
        
    
    
        
            
         
        
            Re: columninfo(listbrowser)
         
        
            
                                    Posted on: 
2013/11/16 13:24 
                                  
                                    #8  
                             
         
     
    
                
                             Home away from home
 
                                     
                     
                                 
                                    
                    
                         
 
                    
                        Joined:  2006/12/4 23:15Last Login
                                :  10/30 14:27
                                                                            Group: 
                                  Registered Users                            
                                                
                                                                            
                                             
                                     
        
                        Also ofcourse you can set weights for the column widths rathe than fixed pixels, when creating the columninfo with the allocation function sdee SetLBColumnInfoAttrs autodoc for info.
                        
             
            
                                    
 
     
    
                
                                
                 
     
    
        
     
     
   
    
  
    
      Currently Active Users Viewing This Thread:
      1
      (
        0 members
                  and 1 Anonymous Users
              )