listview only seeing 1 item of the list

Started by andrew, June 27, 2011, 07:15:33 AM

Previous topic - Next topic

andrew

i know im missing something, and im sure if it was a hand it would slap me but my listview is only showing 1 item of the list

what am i missing?

here is the code


(defun c:dwghist_dwghist_display_ComboBox1_OnSelChanged (ItemCount histfile / file_list datfile ofil curline)
 (setq datfile (strcat "C:\\" histfile))
 (setq ofil (open datfile "r"))  
  (while (setq curline (read-line ofil))  
     (setq file_list (cons curline file_list))  
 )  
 (close ofil)  

 (setq file_list (reverse file_list))
 (dcl_ListView_Clear dwghist_dwghist_display_ListView1)
 (dcl_ListView_FillList dwghist_dwghist_display_ListView1 (list file_list))
; (dcl_ListView_AddString dwghist_dwghist_display_ListView1 file_list)

(princ)
)

owenwengerd

You need to feed a list of lists to FillList:

Code (autolisp) Select
(dcl_ListView_FillList dwghist_dwghist_display_ListView1 (mapcar 'list file_list))
Owen Wengerd (Outside The Box) / ManuSoft

andrew