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?
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.
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.
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.
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),
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.
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.