Started by roy_043 ·
2014-12-01 14:53 UTC ·
6 replies · SMF topic #2213
roy_043
2014-12-01 14:53 UTC
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
2014-12-01 15:47 UTC
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.
roy_043
2014-12-01 18:08 UTC
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
2014-12-01 19:15 UTC
Owen, I Just found out that we have already addressed
{2} (with the same sample files...) in May of this year. My apologies for wasting your time.
owenwengerd
2014-12-02 08:02 UTC
author=roy_043 link=topic=2213.msg11120#msg11120 date=1417457317 wrote:
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),
owenwengerd
2014-12-02 08:03 UTC
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.
roy_043
2014-12-02 09:55 UTC
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.