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
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"
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