Article # 71, added by Geoworks, historical record
| first | previous | index | next | last |

Linking text and list objects.




Q:
I would like to know how to link a GenText to a
DynamicList object. It appears that this is what happens in
GeoManager when the files are displayed as names rather than
icons. It seems as if tabs are used to align various data
elements. There is mention of this in the Text Objects
chapter of the Objects book of the SDK. It says that the
vardata instance ATTR_GEN_TEXT_RUNS_ITEM_GROUP links the
text object to an item group but provides no further
details.

A:
Instead of creating vis objects in the list, I would
handle MSG_GEN_DYNAMIC_LIST_GET_ITEM_CLASS and return your
own subclass of GenItem and handle its VIS_DRAW.

If you want to know what the ATTR you mentioned does, look
in gTextC.def

What ATTR_GEN_TEXT_RUNS_ITEM_GROUPS does is send the
visMoniker of the selected item over to a text item. That
doesn't sound like what you want to do.

In your case, you might consider making each item a VisClass
object so you can handle MSG_VIS_DRAW. Or you can work
directly with the GenDynamicList to handle its MSG_VIS_DRAW.

GeoManager uses its own subclasses to perform the needed
functionality of displaying the files/folders in various
formats. If you swat the GEO2XEC desktop emulation and take
a look at DesktopViewClass (a GenView subclass) and the
objects linked to it, you can see what it is doing.