Home » Developer & Programmer » Forms » How to give alle negative values a red bagground in a multirecord block
How to give alle negative values a red bagground in a multirecord block [message #84497] Tue, 23 March 2004 04:20 Go to next message
TH
Messages: 1
Registered: March 2004
Junior Member
Is it possible to give all the negative values a red bagground in a multirecord block:

column1      column2

1                 10

2                 -5

3                5000

4                100

5                 -1

In the example above, column2 should be red in rows with colum1 in (2,5).

THANX

TH
Re: How to give alle negative values a red bagground in a multirecord block [message #84519 is a reply to message #84497] Thu, 25 March 2004 20:13 Go to previous messageGo to next message
Ritesh Agarwal
Messages: 3
Registered: March 2004
Junior Member
Try using When-New-item-instance trigger. Check for the value in the item in the trigger.
If negative, set the background color to whatever you want.
Re: How to give alle negative values a red bagground in a multirecord block [message #84521 is a reply to message #84497] Fri, 26 March 2004 02:36 Go to previous message
Vamsi Mohan
Messages: 16
Registered: December 2003
Junior Member
In when-validate-item or post-change of column2
or when-validate-record of the block include the following code

if :block.column2 < 0 then
display_item('block.column2','visual_att_red')
else
display_item('block.column2','visual_att_normal')
end if;

create visual attributes visual_att_red with background REd and visual_att_normal with normal properties.
Previous Topic: How to check if record exists?
Next Topic: Passing parameter from menu to a form - V.V.Urgent
Goto Forum:
  


Current Time: Thu Apr 25 08:53:28 CDT 2024