OpenDCL Forums

OpenDCL => Runtime/AutoLISP => Topic started by: garcigj on October 06, 2008, 07:13:26 AM

Title: ListView Problems (2)
Post by: garcigj on October 06, 2008, 07:13:26 AM
OpenDCL Version 5.0.0.25 ENU
ListView Problems:

dcl_ListView_SortTextItems not ordered the images of the ListView ..

Example:
ColumnClick event:
            (defun c:2DrawArch_MemCarp_ListView1_OnColumnClick (nColumn / Fila TextAct Pos)
    (if (and (setq Fila (car (dcl_ListView_GetSelectedNths 2DrawArch_MemCarp_ListView1)))
        (>= Fila 0))
     (Setq TextAct (dcl_ListView_GetItemText 2DrawArch_MemCarp_ListView1 Fila 0))
    )
    ;$SortColsDat$  (t  = Ascending, nil  = Descending)
    (setq $SortColsDat$ (not $SortColsDat$))
    (dcl_ListView_SortTextItems 2DrawArch_MemCarp_ListView1 nColumn $SortColsDat$)
    ;;Seleccionar item actual
    (if (and TextAct
        (Setq Pos (vl-position TextAct
              (dcl_ListView_GetColumnItems 2DrawArch_MemCarp_ListView1 0))))
     (dcl_ListView_SetCurSel 2DrawArch_MemCarp_ListView1 Pos)
    );c.if
   )

Is this a BUG?
¿Solution?
?????????
Title: Re: ListView Problems (2)
Post by: Fred Tomke on October 06, 2008, 07:50:22 AM
Hm, I didn't have a test yet because I hold the data in a list because of having access to all information after OnClick. That's why I sort the list and then I use the FillList method again the make sure that I have the same order.

Maybe Owen can tell us more about the Sort-Methods.

Fred