Some suggestions below...
> From: Elizabeth Chang [mailto:[EMAIL PROTECTED]]
> I want to draw labels from String List to the table object.
> TblSetItemStyle (table, row, 0, labelTableItem);
First, consider using customTableItem style instead of labelTableItem. The
labelTableItem style is hard coded to put a colon ':' at the end of the text
and to use stdFont instead of the current font you set. So you may find it
not very useful. The custom item style lets you supply a draw callback
function where you have full control.
> SysStringByIndex( ... );
Consider _not_ using the SysStringByIndex API at all. Note that it makes a
_copy_ of the requested string into a buffer you provide, which is usually
not desirable unless you plan to modify the copy later. But it sounds like
you are just going to fetch and draw the labels as-is, so you definitely
want to avoid any copying.
Instead, keep the 'tSTL' resource locked for the lifetime of the table and
fetch pointers directly to the strings inside the resource. Then pass those
pointers to TblSetItemPtr (for labelTableItem style) or to WinDrawChars (for
customTableItem style).
-slj-