Having problems with your account or logging in?
A lot of changes are happening in the community right now. Some may affect you. READ MORE HERE

Are there any suggestions for dealing with Borderless tables?

Are there any suggestions for dealing with Borderless tables?

There are two ways to approach the problem.

Show Everything

The first suggestion in dealing with borderless tables is to set the value of the borderless table at the maximum (1.0). This unfortunately gives the problem that suddenly there may be 100"s of levels of table exposed. This can make declarations very large and very messy. One way to partially get around this is to build parent objects into the tags for the child objects. For example:

BrowserChild Registration
  tag "Registration Page 1"
  HtmlHeading EnterUserInfo
     tag "/[HtmlTable]#1/[HtmlColumn]#2/Enter User Information"

The above will allow a reference directly to the object without all of the intermediate levels being considered.

Registration.EnterUserInfo.GetText ()

This is not a perfect solution, as it requires a massive effort on creating window declarations or a massive effort when reading scripts.

Show Nothing

The opposite end of the spectrum would be to turn off the borderless tables entirely. This however can result in unreadable information being returned from the application, particularly if the dynamic tables that may have 10 objects, but sometimes have 200. This can also get difficult with Form Elements.

Ghost Tables

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

This will have to be done for every method to be used.
 

DISCLAIMER:

Some content on Community Tips & Information pages is not officially supported by Micro Focus. Please refer to our Terms of Use for more detail.
Top Contributors
Version history
Revision #:
1 of 1
Last update:
‎2013-02-15 19:24
Updated by:
 
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.