English Amiga Board

English Amiga Board (https://eab.abime.net/index.php)
-   Coders. C/C++ (https://eab.abime.net/forumdisplay.php?f=118)
-   -   ListBrowser column width (https://eab.abime.net/showthread.php?t=74109)

mritter0 16 June 2014 21:22

ListBrowser column width
 
I have a listbrowser set up with 5 columns. I can specify the width in my ColumnInfo using the "old" method
Code:

struct ColumnInfo                                        colInfo1_0[]=
{
        { 22,        "",                                CIF_FIXED },
        { 250,        "Name",                        CIF_FIXED|CIF_DRAGGABLE|CIF_SORTABLE },
        { 60,        "Time",                        CIF_FIXED|CIF_DRAGGABLE|CIF_SORTABLE },
        { 60,        "Date",                CIF_FIXED|CIF_DRAGGABLE|CIF_SORTABLE },
        { 60,        "Notes",                        CIF_FIXED|CIF_DRAGGABLE|CIF_SORTABLE },
        { -1,        (STRPTR)~0,        -1 }
};

I can not get AllocLBColumnInfo() to work for the life of me on OS3.9 (listbrowser.gadget v45.12). Titles are all mesed up and crashes immediately. No big deal.

What I can't get to work is when the column width is adjusted, the new width is not set in the ColumnInfo; it is still at the original width. Either by
Code:

Prefs->Col1_0_1Width=colInfo1_0[1].ci_Width
or
Code:

GetLBColumnInfoAttrs(colInfo1_0,
        LBCIA_Column,                        1,
                LBCIA_Width,                        &Prefs->Col1_0_1Width,
TAG_DONE);

It does not have the new column width. Is there a way to find this out? I want to save it so it re-opens with the user's custom widths.

Minuous 08 August 2017 07:03

Quote:

Originally Posted by mritter0 (Post 960024)
I can not get AllocLBColumnInfo() to work for the life of me on OS3.9 (listbrowser.gadget v45.12). Titles are all mesed up and crashes immediately.

Before 53.16 the ColumnInfo array was not automatically terminated.


All times are GMT +2. The time now is 04:51.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.

Page generated in 0.04138 seconds with 11 queries