供参考:
public void displayOption(Common _record, FormRowDisplayOption _options)
{
LedgerJournalTrans localJournalTrans;
;
localJournalTrans = _record;
super(_record, _options);
if (element.showNegativeRed())
{
if (localJournalTrans.AmountCurDebit < 0)
{
_options.textColor(WinApi::RGB2int(255,0,0));
_options.affectedElementsByControl(LedgerJournalTrans_AmountCurDebit.id());
_options.affectedElementsByControl(AmountCurDebit.id());
ledgerJournalTrans_ds.clearDisplayOption(localJournalTrans);
}
if (localJournalTrans.AmountCurCredit < 0)
{
_options.textColor(WinApi::RGB2int(255,0,0));
_options.affectedElementsByControl(LedgerJournalTrans_AmountCurCredit.id());
_options.affectedElementsByControl(AmountCurCredit.id());
ledgerJournalTrans_ds.clearDisplayOption(localJournalTrans);
}
}
}