Monday, January 17, 2005
Resco AdvancedList Control 2.1 for .NET CF
Posted by Jimmy Dodd in "SOFTWARE" @ 10:00 AM
Cell Types
As has already been mentioned, the actual display objects of the control are defined using a series of Cell class objects. Each of these classes defines a set of properties that display data in a unique manner.
Figure 6: Cell types.
Text Cell objects displays text, either a constant string or a text field from the datasource. The TextCell has properties that allow for defining the foreground and background colors, the font, and the alignment of text within the cell (both vertical and horizontal). Additionally, a format string which works like the String.Format( ) method can be specified which will allow further control of the text. This is especially useful when adding labels to the displayed text.
Long text strings wrap automatically if the TextCell's height property is sufficiently large enough to accommodate it without cropping. Text strings that are too long to fit entirely within the TextCell are truncated on the right, but a small triangle is displayed to note the string continues beyond the cell boundary. Tap-and-holding on this triangle displays the entire string in a tool-tip like popup window. This is a nice feature and allows for conservation of screen space without losing access to the data. The use of a small triangle instead of an ellipsis saves space and stands out better than three periods as well.
The Image Cell object uses its data value as an index into an ImageList and displays the associated bitmap image. Since Cells can overlap bitmap images can be used as background images for the entire row by setting all other cells background color to Transparent.
The Link Cell displays its bound data as a hyperlink. In addition to the normal BackColor and ForeColor properties, the Link Cell contains ActiveColor and VisitedColor properties to show the state of the link. Tapping on a Link Cell fires a special LinkClick event on the AdvancedList control.
Figure 7: Using Link Cells and a bitmap as a background.
The Separator Cell simply provides a visual means of separating other cells vertically or horizontally.









