For the background color, I'd like to do something like
IF(<view_only>,<number for button face>,<number for windows background>)
The <view_only> is the runtime value I'd like to test.
One thought I had was to make a computed column and set it to "view" or
"true" or something in all the rows at runtime, depending on my "view"
variable. Is that the best solution?
Then, of course, my other problem is the the tab order isn't in the list of
things that will take expressions. I can never find the modify attributes.
I'm hoping
this.modify("taborder=0") will do it. If not, could someone point me to
that documentation location?
Setting Background.Mode equal to 1 turns the column background transparent.
The advantage of this is that the actual tab order and background color is
preserved, so you can flip between edit and read only modes without having
to store this info.
Also, if you want to turn the whole DW readonly, use
dw_1.Modify("datawindow.readonly = yes")
You'll still have to set all column background modes. For ex.
For i = 1 To li_ColumnCount
dw_1.Modify("#" + String(i) + ".Background.Mode = '0~tif (view_only =
1, 1, 0)'")
Next
Hope this helps..
- Saxon
Laurel wrote in message <01bd04b9$1091e6a0$3a00...@laurel.quodata.com>...
// of_SetReadOnly() - LAS - 12/97
Integer li_Column, li_column_count
string ls_junk, ls_dddw_name, ls_ddlb_name, ls_debug
idw_requestor.Modify("Datawindow.ReadOnly = yes")
li_column_count = Integer(idw_requestor.Describe &
("Datawindow.Column.Count"))
For li_Column = 1 To li_Column_Count
// Turn the color to transparent
idw_requestor.Modify("#" + String(li_Column) &
+ ".Background.Mode = 1")
// If the column has a dddw or ddlb edit style, then set
// "always show arrow" to 'no'
ls_dddw_name &
= idw_requestor.Describe("#" + String(li_Column) &
+ ".dddw.name")
IF (ls_dddw_name <> "?") AND (ls_dddw_name <> "!") THEN
idw_requestor.Modify("#" + String(li_Column) &
+ ".ddlb.useasborder = no")
END IF
ls_ddlb_name &
= idw_requestor.Describe("#" + String(li_Column) &
+ ".ddlb.name")
IF (ls_ddlb_name <> "?") AND (ls_ddlb_name <> "!") THEN
idw_requestor.Modify("#" + String(li_Column) &
+ ".ddlb.useasborder = no")
END IF
Next
Return 1
ls_EditStyle = Lower(idw_requestor.Describe("#" + string(li_Column) +
".Edit.Style"))
if ls_EditStyle = 'ddlb' Or ls_EditStyle = 'dddw' Then
idw_requestor.Modify("#" + String(li_Column) + "." + ls_EditStyle +
".useasborder = no")
End If
If a column isn't a dddw, all column.dddw.expression describes will return
an error(!).
- Saxon
>dddw's and ddlb's. Another weirdness is that trying to access ddlb.name on
>a non-ddlb field gives you "!", while doing the same thing for dddw.name
>returns a "?".
> ls_dddw_name &