|
回复 1# 的帖子
I think below information is useful for you:
GhostTable is a class which turns itself on and off as needed by using whatever value is required to make the table appear.
winclass GhostTable : HtmlTable
setting DontInheritClassTag = TRUE
// create this data member in your ghost table and
// set this to the value required to make this table
// "appear" to SilkTest
REAL rBorderlessTableSetting
REAL rOldSetting
void Appear ()
WINDOW wParent
// find the top level parent of this instance
wParent = GetTopLevelItem (this)
// grab the current setting
this.rOldSetting = wParent.GetUserOption ("ShowBorderlessTables")
// set to the new setting for the parent
wParent.SetUserOption ("ShowBorderlessTables", rBorderlessTableSetting, USEROPT_WINDOW)
Additionally, there's a Vanish method that , sets the ShowBorderlessTables setting back to the original. The methods for the HtmlColumn class call this class method so that you can call HtmlColumn methods as well. The downside to this is that it will be required to rewrite the HtmlTable and HtmlColumn classes to first use Appear and then Vanish e.g.
INTEGER GetColumnCount ()
INTEGER iRtn
// make the table appear
Appear ()
// get the built-in method's value
[-] do
[ ] iRtn = derived::GetColumnCount ()
[-] except
[ ] Vanish ()
[ ] reraise
// make the table disappear
Vanish ()
[ ] return iRtn |
|