Riceball,LEE - 2004-05-29

Logged In: YES
user_id=68880

I've finished the feature.

(InstantPersistence.pas)
add the DisplayLabel to TInstantAttributeMetadata
TInstantAttributeMetadata = class (...)
published
{ Summary Contains the text to display in the
corresponding column heading of a data grid. added by
riceball}
property DisplayLabel: string read FDisplayLabel write
FDisplayLabel;

(InstantCode.pas) 1499Line

const
....
MetaKeyValid = 'valid';
MetaKeyWidth = 'width';
MetaKeyLabel = 'label';

procedure TInstantCodeAttribute.InternalRead(Reader:
TInstantCodeReader);
...
else if Token = MetaKeyWidth then
Metadata.DisplayWidth := Reader.ReadInteger
else if Token = MetaKeyLabel then
Metadata.DisplayLabel := Reader.ReadStringValue
else
Reader.ErrorMessage('Unknown parameter: ' + Token);
....

procedure TInstantCodeAttribute.InternalWrite(Writer:
TInstantCodeWriter);
...
WriteInt(MetaKeyWidth, Metadata.DisplayWidth);
WriteStr(MetaKeyLabel, Metadata.DisplayLabel);
...

then modified the Design-time form to supports it
(InstantAttributeEditor.pas)
see the attachments.