OpenDCL Forums

OpenDCL => Runtime/AutoLISP => Topic started by: aymen_ellouze on December 28, 2010, 07:15:28 AM

Title: ListView columntitle
Post by: aymen_ellouze on December 28, 2010, 07:15:28 AM
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
Title: Re: ListView columntitle
Post by: owenwengerd on December 28, 2010, 09:21:00 AM
Can you attach a minimal project that I can use to reproduce the problem?
Title: Re: ListView columntitle
Post by: aymen_ellouze on December 28, 2010, 02:51:44 PM
here is it
Title: Re: ListView columntitle
Post by: owenwengerd on December 28, 2010, 04:38:09 PM
Did you forget to attach the code?
Title: Re: ListView columntitle
Post by: aymen_ellouze on December 29, 2010, 02:42:57 AM
oups sorry here is it :)))
Title: Re: ListView columntitle
Post by: owenwengerd on December 29, 2010, 08:39:16 AM
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.