[comp.windows.x] Trivial widget subclasses

dce@smsc.sony.com (David Elliott) (01/17/91)

There have been a number of cases where I would like to group a number
of widgets based on purpose instead of on hierarchy, and address their
resources as a group.  For example, I have an application with a
RowColumn widget holding with 6 pairs of labels.  The first label in
all the pairs is a title, and the second is a value.  So, I'd like to
be able to work with the titles as a group, the values as a group,
and all the labels as a group.

Now, it seems to me that the only correct way to do this is to
create two subclasses of the label widget: titleLabel and valueLabel,
and use these.  Is there an easier way that doesn't cause problems?

If not, it seems to me that having sample code that implements these
trivial subclasses and allows one to give the name at compile time,
or even at runtime if possible, would be very useful.  I believe
that this should be fairly easy for the Athena widgets, since their
distribution isn't restricted, but Motif may be a hassle.  Assuming
that this is a good way to go, are people interested in seeing
this done?