Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
123 user(s) are online (83 user(s) are browsing Forums)

Members: 1
Guests: 122

flash, more...

Headlines

 
  Register To Post  

columninfo(listbrowser)
Home away from home
Home away from home


See User information
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"},
    {   
70,  "      Genre"},
    { -
1, (STRPTR)~0, -}
};

        
LAYOUT_AddChildgadgets[GID_LISTVIEW] = ListBrowserObject,
                                            
GA_ID,GID_LISTVIEW,
                                            
GA_RelVerifyTRUE,
                                            
GA_ReadOnly,FALSE,
                                            
LISTBROWSER_SortColumn,
                                            
LISTBROWSER_EditableFALSE,
                                        
//    LISTBROWSER_ColumnInfo, (ULONG)&ci,
                                            
LISTBROWSER_ColumnTitlesTRUE,
                                            
LISTBROWSER_Labels,info_liste,   
                                            
LISTBROWSER_MakeVisible,1,
                                            
LISTBROWSER_ShowSelectedTRUE,
                                            
LISTBROWSER_HorizontalPropFALSE
                                        
ListBrowserEnd,

X5000
Go to top
Re: columninfo(listbrowser)
Home away from home
Home away from home


See User information
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.


Go to top
Re: columninfo(listbrowser)
Just can't stay away
Just can't stay away


See User information
@Antique

Hi, I use a listbrowser and columninfo like this, hope it helps:

columninfo IListBrowser->AllocLBColumnInfo(2,
                             
LBCIA_Column,0LBCIA_Title," Keymap"LBCIA_AutoSort,TRUELBCIA_Sortable,TRUE,
                             
LBCIA_Column,1LBCIA_Title," Description",
                            
TAG_DONE);
..
LAYOUT_AddChildOBJ(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_ColumnTitlesTRUE,
                       
LISTBROWSER_ShowSelectedTRUE,
                       
//LISTBROWSER_Selected,     -1,
                       
LISTBROWSER_MinVisible,   6,
                       
LISTBROWSER_Striping,     LBS_ROWS,
                      
TAG_DONE),
..

Go to top
Re: columninfo(listbrowser)
Home away from home
Home away from home


See User information
@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
Go to top
Re: columninfo(listbrowser)
Amigans Defender
Amigans Defender


See User information
@Antique
You are passing a pointer to a pointer (&ci) which is wrong. If it worked before it was dumb luck.

ExecSG Team Lead
Go to top
Re: columninfo(listbrowser)
Home away from home
Home away from home


See User information
@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
Go to top
Re: columninfo(listbrowser)
Home away from home
Home away from home


See User information
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.




Go to top
Re: columninfo(listbrowser)
Home away from home
Home away from home


See User information
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.


Go to top

  Register To Post

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2023 The XOOPS Project