Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Datawindow backgound color problem

Status
Not open for further replies.

girls3dog1

Programmer
Nov 22, 2002
30
US
PB 8.0.1 Build 8004

I'm attempting to change the column background color anytime the user edits the existing column data. Once the data is saved the background returns to the original color before editing. Either of the the following methods works. However, once the modify or dot property method is executed, the mouse cursor always jumps to the
beginning of the column data being edited. I then have to move the cursor back to where I started to edit the column data. Is this a PB bug? Are there any suggested workarounds? Thanks in advance for your assistance.


This is fired from the editchanged event of the datawindow.

Method 1

dw_customer_detail.Modify(ls_ColName+".Background.Color='7471103'")

Method 2

DWObject dwo_column
dwo_column = dw_customer_detail.Object.fieldcabinet
dwo_column.Background.Color='7471103'

 
Hi,
You dont have to use the modify method. Just,add this expression to the background color property of your datawindow column.
if(isrowmodified(),rgb(255, 255, 0),rgb(255,255,255))
 
Yes...that's my family; a wife, two girls and one dog.

I have tried this before (if(isrowmodified(),rgb(255, 255, 0),rgb(255,255,255))) and all columns change color, not just the one I'm editing. Too bad there's not a IsColumnModified() function.
 
I have tried this before (if(isrowmodified(),rgb(255, 255, 0),rgb(255,255,255))) and all columns change color, not just the one I'm editing. Too bad there's not a IsColumnModified() function.
it works for me. did you put the expression in the datawindow column properties (or) detail band properties?
 
Yes, I placed the expression in each of the column background color properties. I just tried it again and if I edit any column, then all column background colors change.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top