One of the things Swift (especailly for iOS) is lacking is a “listbox/datagrid” like control… yeah it has UITableview, but that is really good for one column without getting really complex and fragile. So I have embarked on a custom control the is actually based on a UIView not a UITableView or even an UICollectionView. It consists of 3 primary dictionaries. One for Rowdata (such as Height, Tag and default color), one for ColumnData (width, header, alignment etc), and one for the Cells. Each dictionary only has an entry if it needs it… ie. “Sparse Array”
But here is my question for which I would like your opinion.
The Xojo List box has a FONT (name/Size) assigned to the control… and each cell uses that (barring an override by CellTextPaint). I want to expand the “default” behaviour…
- Add ONE font class like the Xojo Listbox … and force the developer to use “CellTextPaint” for anything “different”
- Add one to the RowClass, the ColClass and the CellClass… and have it use the CellClass if there was one, else inherit from ColClass if it had one, else inherit from RowClass… This way it would be most flexible, but incur more overhead both in storage and in drawing time.
Basically I want my “Listbox” to be able to display basic text in any font/size/color while leaving CellBackground/CellTextPaint for those “special” needs.