OpenDCL Forums

OpenDCL => Runtime/AutoLISP => Topic started by: roy_043 on December 01, 2014, 06:53:56 AM

Title: dcl-Control-SetColumnHeader doesn't seem to work.
Post by: roy_043 on December 01, 2014, 06:53:56 AM
For a small project I want to dynamically change a list view including the column header. But for some reason I can't get dcl-Control-SetColumnHeader to work. Is there something wrong with my code or is this perhaps a bug?
Title: Re: dcl-Control-SetColumnHeader doesn't seem to work.
Post by: owenwengerd on December 01, 2014, 07:47:34 AM
I am travelling and can't check the source code right now, but I believe that is a design-time-only property. You could change it at runtime, but you would need to make the change before showing the form.
Title: Re: dcl-Control-SetColumnHeader doesn't seem to work.
Post by: roy_043 on December 01, 2014, 10:08:37 AM
The function dcl-Control-SetColumnHeader is called in the 'OnInitialize' event. Is this what you mean by 'before showing the form'?

Note: BricsCAD 14.2.17 + OpenDCL 8.0.0.10.
Title: Re: dcl-Control-SetColumnHeader doesn't seem to work.
Post by: roy_043 on December 01, 2014, 11:15:01 AM
Owen, I Just found out that we have already addressed this problem (http://www.opendcl.com/forum/index.php?topic=2143.5) (with the same sample files...) in May of this year. My apologies for wasting your time.
Title: Re: dcl-Control-SetColumnHeader doesn't seem to work.
Post by: owenwengerd on December 02, 2014, 12:02:05 AM
Quote from: roy_043 on December 01, 2014, 10:08:37 AM
The function dcl-Control-SetColumnHeader is called in the 'OnInitialize' event. Is this what you mean by 'before showing the form'?

OnInitialize is too late for design-time properties. I meant before (dcl-Form-Show),
Title: Re: dcl-Control-SetColumnHeader doesn't seem to work.
Post by: owenwengerd on December 02, 2014, 12:03:41 AM
BTW, the Combo Box Lab sample deals with the issue (actually different properties, but same design-time-only problem) by closing and reshowing the form.
Title: Re: dcl-Control-SetColumnHeader doesn't seem to work.
Post by: roy_043 on December 02, 2014, 01:55:44 AM
Thanks for pointing out 'Combo Box Lab'. It is quite impressive. But for what I want, a blank list view until a database is selected, it is perhaps too much overhead. Also I do not want to close the form. Maybe I'll use a second dummy list view and just play with the visibility property instead.
Thanks again Owen.