On Tue, Dec 9, 2008 at 14:21, Jesus Reyes <[EMAIL PROTECTED]> wrote: > Indeed it worked that way when custom columns (cc) were implemented, what I > didn't like is that it may "cancel" cc without notice, for example when at > design time a set of cc are set up and this is why it currently enforce the > use of cc to change counts. > But I don't really see a problem that colcount changes automatically the > number of cc if there are some already, if there are no cc I think it should > not add any, or what you think about it?
The problem I ran into was as follows: SGrid.ColCount := 2; SGrid.Columns[1].Alignment := taCenter; // Oops! It is counter intuitive to me that the above code needs additional call to SGrid.Columns.Add So, IMO the correct solution would be to _remove_ SGrid.Columns.Add totally and add/remove columns as needed when ColCount changes, thus leaving a single well-defined interface without the possibility of confusion. However, this is not backwards-compatible... so, as a compromise, perhaps Columns.Add should increase ColCount to keep both in sync? -- Alexander S. Klenin Insight Experts Ltd. _______________________________________________ Lazarus mailing list [email protected] http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
