dcl-Control-SetColumnHeader doesn't seem to work.

Started by roy_043, December 01, 2014, 06:53:56 AM

Previous topic - Next topic

roy_043

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?

owenwengerd

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.
Owen Wengerd (Outside The Box) / ManuSoft

roy_043

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.

roy_043

Owen, I Just found out that we have already addressed this problem (with the same sample files...) in May of this year. My apologies for wasting your time.

owenwengerd

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),
Owen Wengerd (Outside The Box) / ManuSoft

owenwengerd

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.
Owen Wengerd (Outside The Box) / ManuSoft

roy_043

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.