ListView columntitle

Started by aymen_ellouze, December 28, 2010, 07:15:28 AM

Previous topic - Next topic

aymen_ellouze

Hi all,
Using the list view control when i display for the first time a form column title are not displayed (see image 1), the second time i got them (see image 2).
here is the code section in the oninitialize event :
   
Code (autolisp) Select

;; filling the listview :

    (dcl_ListView_Clear GDLCApp_SpacioForm_VersionListView)
    (dcl_Control_SetListViewStyle
      GDLCApp_SpacioForm_VersionListView
      3
    )
    (dcl_ListView_AddColumns
      GDLCApp_SpacioForm_VersionListView
      (list
(list "Version" 1 60)
(list "Description" 0 200)
(list "Date" 1 100)
      )
    )

    (dcl_Control_SetEditLabels
      GDLCApp_SpacioForm_VersionListView
      nil
    )
    (dcl_Control_SetGridLines
      GDLCApp_SpacioForm_VersionListView
      nil
    )
    (dcl_Control_SetMultipleSelection
      GDLCApp_SpacioForm_VersionListView
      nil
    )
    (dcl_Control_SetShowSelectAlways
      GDLCApp_SpacioForm_VersionListView
      T
    )
    (dcl_Control_SetFullRowSelect
      GDLCApp_SpacioForm_VersionListView
      T
    )

    (foreach version VersionsList
      (dcl_ListView_AddItem
GDLCApp_SpacioForm_VersionListView

(dos_getini
  "ProjectDef"
  "ProjectVersion"
  (strcat VersionDir "\\" version)
)

(dos_getini
  "ProjectDef"
  "ProjectComment"
  (strcat VersionDir "\\" version)
)

(dos_getini
  "ProjectDef"
  "ProjectDate"
  (strcat VersionDir "\\" version)
)
      )
    )


    (dcl_ListView_SetCurSel
      GDLCApp_SpacioForm_VersionListView
      *GDLC:EXP:EYE:CurVersion*
    )



(tested with various version of acad and bcad, on winXP and got the same problem)

is it a bug or i made a mistake somewhere ?

thx in advance
aymen ellouze
architect & software developer

owenwengerd

Can you attach a minimal project that I can use to reproduce the problem?
Owen Wengerd (Outside The Box) / ManuSoft

aymen_ellouze

aymen ellouze
architect & software developer

owenwengerd

Did you forget to attach the code?
Owen Wengerd (Outside The Box) / ManuSoft

aymen_ellouze

aymen ellouze
architect & software developer

owenwengerd

Thanks. I experimented with your sample, and found that the list view style cannot be changed at runtime; it must be set at design time.
Owen Wengerd (Outside The Box) / ManuSoft