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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

highlighting the current Item

Status
Not open for further replies.

tendo

MIS
Jan 7, 2002
4
0
0
DE
Hello everyone !

I have this Problem:
I want to highlight the focused item in a DW
I have the following Code in the itemfocuschanged event of my uo_DataWindow:

//Instance Variables
String i_itmbackground
DWObject i_curobj


//itemfocuschanged event:
//restore old Values (indeed this is a user function)
if not isNull(i_curobj) then
i_curobj.background.Mode = 1
i_curobj.background.color = i_itmbackground
end if
setNull(i_curobj)


//white background
i_curobj = dwo
i_itmbackground = i_curobj.background.color
if i_curobj.Type = "column" and (i_curobj.Edit.Style = "edit" or i_curobj.Edit.Style = "editmask") then
i_curobj.background.Mode = "0~tif (currentRow() = getrow(), 2, 1)"
i_curobj.background.Color = "0~tif (currentRow() = getrow(), RGB(255,255,255), RGB(0,0,100) )"
end if
// !

this seems to work, if the row is retrieved from the DB.
But in a new Record the first field is ok and when i TAB to the next field
this field duplicates the value of the first. Tabbing to the next this field displays the
value and the second now is empty.

What is wrong with this code ?
Using PB801

thanks in advance
Joachim
 
Why not specify your condition in the DW design ? It will be much simple Best regards
LiGang
U get , U given ..
 
thanks for your response !

Coding it in design about 50 times!
I thought its OOP and i want to code it
once and use it often.

any help ?

Joachim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top