hi friends,
am trying to change the font colors using displayOption,
i just override the displayOption but, dont kwn wht to write in the code…
pls help me
thanx
hi friends,
am trying to change the font colors using displayOption,
i just override the displayOption but, dont kwn wht to write in the code…
pls help me
thanx
Hi,
Refer to form called ‘tutorial_Form_DisplayOptions’
have a look into this code you will get an idea to wrote this method according to your requirement…
public class FormRun extends ObjectRun
{
QueryBuildrange mySalesStatus;
}
public void displayOption(Common _record, FormRowDisplayOption _options)
{
SalesTable prodtablelocal;
prodtablelocal = _record;
Switch(prodtablelocal.SalesStatus)
{
Case SalesStatus::Delivered:
_options.backColor(65535); //Light Yellow
_options.affectedElementsByControl(Salestable_SalesId.id());
Break;
Case SalesStatus::Invoiced:
_options.backColor(8421631); //Light Red
_options.affectedElementsByControl(Salestable_SalesId.id());
Break;
Case SalesStatus::Backorder:
_options.backColor(65408); //Light Green
//_options.affectedElementsByControl(Salestable_SalesId.id());
_options.textColor(12582912);
Break;
}
}
public void executeQuery()
{
;
if (comboBox.selection())
mySalesStatus.value(QueryValue(comboBox.selection()));
else
mySalesStatus.value(" ");
super();
}
public void init()
{
super();
mySalesStatus = this.query().dataSourceNo(1).addRange(fieldnum(SalesTable, SalesStatus));
salestable_ds.executeQuery();
}
Thanx Harish Mohanbabu**,** Venkatesh
Hi!
I have this problem.
The color of the row of the grid is set at start of the form. If I change the filed value that determinate the color of the row of the grid, the color of the row doesn’t change because there are no call to method diplayoption.I tried to force the call of the method displayOption on modify of the field datasource of the form, but I failed.
Example
I have set for field value “field1” this situation
row 1 with color red
row 2 with color red
row 3 with color blue
If the user change the value of the field1 for the row 2 i must change the color to blue.
I tried to call on modify method of field1 of the datasource of the form. ( table1_ds.displayOption(table1,???) )
I have no idea if it is possible?
Thanks for the attention