PdcCalculation.SelectHeader: Difference between revisions

From External Bemet Wiki
Jump to navigation Jump to search
Created page with "== Declaration == == Description == == Notes == == Code example == <source lang="vb"> </source> == Availability =="
 
No edit summary
 
Line 1: Line 1:
== Declaration ==
== Declaration ==
 
SelectHeader as Boolean


== Description ==
== Description ==
 
Selects the mother calculation in the form's treeview


== Notes ==
== Notes ==
This method selects the top level of the active showed calculation object.


This only applies to the calculation form on screen in PdC!
Call this method to make sure the user hasn't the calculations tab 'Other' active. When the user certainly have and 'SelectHeader' isn't called, the calculationscreen is frozen in some situations.
When the top level of the calculation needs to be selected while the object resides in the background please use a recursive function to select the objCalc.Parent.


== Code example ==
== Code example ==
 
This code example uses the calculation on the screen in PdC, shows the calculation number, select its header and shows the header's calculation number.


<source lang="vb">
<source lang="vb">
dim objCalc


  set objCalc = pdc.ActiveCalculation
  msgbox "Active calculation = " & objCalc.CalculationNo
  objCalc.SelectHeader
  set objCalc = pdc.ActiveCalculation
  msgbox "Active calculation = " & objCalc.CalculationNo
</source>
</source>


== Availability ==
== Availability ==

Latest revision as of 08:45, 21 May 2012

Declaration

SelectHeader as Boolean

Description

Selects the mother calculation in the form's treeview

Notes

This method selects the top level of the active showed calculation object.

This only applies to the calculation form on screen in PdC! Call this method to make sure the user hasn't the calculations tab 'Other' active. When the user certainly have and 'SelectHeader' isn't called, the calculationscreen is frozen in some situations. When the top level of the calculation needs to be selected while the object resides in the background please use a recursive function to select the objCalc.Parent.

Code example

This code example uses the calculation on the screen in PdC, shows the calculation number, select its header and shows the header's calculation number.

dim objCalc

  set objCalc = pdc.ActiveCalculation
  msgbox "Active calculation = " & objCalc.CalculationNo
  objCalc.SelectHeader
  set objCalc = pdc.ActiveCalculation
  msgbox "Active calculation = " & objCalc.CalculationNo

Availability