When i add nodes to a struct list, all goes well and the new node is added at the end of the list. But now i'm trying to add a node in the middle or at the beginning of the list, and no matter what i try it always goes at the end. Anyone here good at this thing? some code is at the bottom so people can see what i do.
SetGadgetAttrs(gadgets[GID_LISTVIEW], windows[WID_MAIN], NULL,LISTBROWSER_Labels, ~0,TAG_DONE);
node = (struct Node *)AllocListBrowserNode(4,
LBNA_Column, 0,
LBNCA_CopyText, TRUE,
LBNCA_Text,tall,
LBNA_Column, 1,
LBNCA_CopyText, TRUE,
LBNCA_MaxChars, 255,
LBNCA_Text,test,
LBNA_Column, 2,
LBNCA_CopyText, TRUE,
LBNCA_Text,type,
LBNCA_Justification, LCJ_CENTRE,
LBNA_Column, 3,
LBNCA_CopyText, TRUE,
LBNCA_Text,text,
TAG_DONE);
AddTail( &liste, node);
RefreshSetGadgetAttrs(gadgets[GID_LISTVIEW], windows[WID_MAIN], NULL,LISTBROWSER_Labels,&liste ,TAG_DONE);