I am building a class that displays either a combobox or a listview (more to follow in the future). Part of the class is a list called OptionList that holds all the values. In the class are methods to update the list and read the list and set the displaystyle (combobox or listview). The List will be bound to either the combobox or the Listview. During runtime the displaystyle can be changed.
I am having a hard time figuring out what the best setup for this would be, should I add a Control member in the class that can be either the listview or the combobox or are there better ways to implement this?
In the calling class I simply want to show the control and update / read the list without worrying what the actual control is
Aucun commentaire:
Enregistrer un commentaire