3.7.5.49 Page.cp
The page.cp object has properties and methods related to the Control Pane in the workbook or matrixbook window. The page object can be referred to using "page".
Contents
Properties
| Property | Access | Description |
|---|---|---|
| page.cp.bp.switch(2027) | Read/write numeric |
Access Column Switching Browser Graph's menu to add more columns: 0 = no , 1 = All Columns from Same Sheet, 2 = Similar Columns from Same Book |
| page.cp.show | Read/write numeric |
Show or hide the Control Pane: 1 = show, 0 = hide. |
| page.cp.type | Read/write numeric |
Set to 0 to collapse the Control Pane. Or returns the Control Pane type:
1 = Column Switching Browser Graph |
| page.cp.type$ | Read Only | Returns the Control Pane type:
DataFilter = Data Navigator |
| page.cp.columnswitchingbrowser | Read/write numeric |
Open/Collapse the control panel of Column Switching Browser Graph.
|
| page.cp.booksheetchanger | Read/write numeric |
Open/Collapse the control panel of Sheet/Book Switching Browser Graph.
|
| page.cp.datafilter | Read/write numeric |
Open/Collapse the control panel of worksheet slicer.
|
| page.cp.shareddatafilter | Read/write numeric |
Open/Collapse the control panel of graph slicer.
|
Methods
| Method | Description |
|---|---|
| page.cp.add(postion percent name [option]) | Add/Open Control Pane postion: 1 = left, 2 = top,3 = right, 4 = bottom |
| page.cp.bp.changewks(BookSheetRangeString)(2027) | For Column Switching Browser Graph to change worksheet. Returns 1 if BookSheetRangeString is legal and the change is executed. page.cp.bp.changewks([Book2]Step03) |
| page.cp.bps.switch(value)(2027) | For Sheet/Book Switching Browser Graph to set Data Filter menu. The possibly values depend on the current value of the property page.dpbkshinfo of the graph. Only the values 2 and 3 of page.dpbkshinfo are supported. When the value of page.dpbkshinfo = 2, the value 0 of the argument corresponds to "Similar Sheets in Book", the value 1 to "Similar Sheets in Folder", etc. |
| page.cp.remove() | Remove/Collapse the Control Pane. |
| page.cp.settree()(Reserved) | Set GETN tree to the Control Pane. |
Examples
Workbook
Data Navigator
//import an Excel file by Data Connector newbook; wbook.dc.add("Excel"); wks.dc.source$=System.path.program$+"Samples\Import and Export\United States Energy (1980-2013).xls"; wks.dc.sel$="Natural Gas"; wks.dc.import(); //remove data navigator wbook.dc.nav=0 //add back data navigator page.cp.add(1 25 DataNavigator:DC 3); //same as wbook.dc.nav=1
Graph
Sheet/Book Switching Browser Graph
//import an Excel file by Data Connector newbook; wbook.dc.add("Excel"); wks.dc.source$=System.path.program$+"Samples\Import and Export\United States Energy (1980-2013).xls"; wks.dc.sel$="<All>"; wks.dc.import(); //plot plotxy iy:=[Book2]Oil!(A,B); //add browser page.cp.add(1 24 PlotsBookSheetChanger 3) //switch sheet page.switch("[book2]Coal")
Column Switching Browser Graph
page.cp.add(1 24 PlotSelector 3)
Slicer
//import data newbook; wbook.dc.add("CSV"); wks.dc.source$=System.path.program$+"Samples\Statistics\automobile.dat"; wks.dc.import(); //plot plotxy iy:=[Book2]automobile!(C,E); //add data filter on plot page -dfn 2; //add Slicer page.cp.add(1 25 DataFilter:Shared 3);
Worksheet Slicer
page.cp.add(1 24 DataFilter 3)