J
jehugaleahsa
Hello:
I'm implementing a Table in GDI+. I represent ColumnHeaders and Cells
with the same abstract class ACell. The only difference between Cell
and ColumnHeader is how widths are specified. A ColumnHeader is
responsible for indicating the width of the column. All cells look to
their respective ColumnHeader to get their width.
I would like to provide the ColumnHeader with a setter for Width,
while restricting it for the Cell. I would hate to provide a no-op
setter for the Cell's Width.
I know you can add a setter if implementing an interface. This isn't
true for abstract classes . . . I'm not sure why.
Is there a language feature to deal with this? How do I deal with it?
Thanks,
Travis
I'm implementing a Table in GDI+. I represent ColumnHeaders and Cells
with the same abstract class ACell. The only difference between Cell
and ColumnHeader is how widths are specified. A ColumnHeader is
responsible for indicating the width of the column. All cells look to
their respective ColumnHeader to get their width.
I would like to provide the ColumnHeader with a setter for Width,
while restricting it for the Cell. I would hate to provide a no-op
setter for the Cell's Width.
I know you can add a setter if implementing an interface. This isn't
true for abstract classes . . . I'm not sure why.
Is there a language feature to deal with this? How do I deal with it?
Thanks,
Travis