Beruflich Dokumente
Kultur Dokumente
Pgina 1 de 11
Button
The QlikView button, a superset of the QlikView sheet object
Method Detail
Activate
Activate()
ActivateAlso
ActivateAlso()
ApplyTheme
ApplyTheme(String FileName)
Returns:
No return value
Earliest version:
6.0x
CanPrint
Boolean CanPrint()
Close
Close()
CopyBitmapToClipboard
Boolean CopyBitmapToClipboard()
CopyTableToClipboard
Boolean CopyTableToClipboard(Boolean IncludeLabels)
file:///C:/Users/Opss/Downloads/QlikViewAPI_html/Button.htm
17/03/2016
Button
Pgina 2 de 11
Returns:
True if operation was successful
Earliest version:
4.0x
CopyTextToClipboard
Boolean CopyTextToClipboard()
CopyValuesToClipboard
Boolean CopyValuesToClipboard()
Copies the values of a chart object to clipboard (not available for pivot tables).
Earliest version:
4.0x
DbGetTableData
Ireturn object for SheetObject.DbGetTableData() and CustomDropDown.DbGetTableData() and GraphBasics.D... DbGetTableData(Variant (Array of Integer) Colu
Returns data from table for QV ODBC driver. Irrelevant for button objects
Parameters:
Columns (Variant (Array of Integer)) : Array of column numbers
ForceText (Variant (Array of Boolean)) : Not implemented
StartRow (Integer) : First row to extract
NoOfRows (Integer) : Number of rows to extract
to extract (0 based)
Returns:
Returns data from table for QV ODBC driver
Earliest version:
4.0x
DbGetTableInfo
Ireturn object for SheetObject.DbGetTableInfo() and CustomDropDown.DbGetTableInfo() and GraphBasics.D... DbGetTableInfo()
Returns information about fields in table for QV ODBC driver. Irrelevant for button objects
Earliest version:
4.0x
DbIsTable
Boolean DbIsTable()
Returns true if the object is a table box, straight table or bitmap chart (and thus can deliver data to QV ODBC driver).
Earliest version:
4.0x
Deactivate
Deactivate()
Removes the sheet object from the list of active sheet objects.
Earliest version:
6.0x
file:///C:/Users/Opss/Downloads/QlikViewAPI_html/Button.htm
17/03/2016
Button
Pgina 3 de 11
DialogPrint
Boolean DialogPrint()
DialogProperties
Boolean DialogProperties(Integer Page)
ExportBitmapToFile
Boolean ExportBitmapToFile(String Filename)
Returns:
Returns true if export succeeded
Earliest version:
6.0x
GetCaption
ICaption GetCaption()
GetCell
IRCCell GetCell(Integer Row, Integer Column)
Returns a sheet object cell by its x/y coordinates in the current state of the layout.
Parameters:
Row (Integer) : Sheet object row (0 based)
Column (Integer) : Sheet object column (0 based)
Returns:
Cell content object returned
Earliest version:
7.00
Example:
set obj = ActiveDocument.GetSheetObject( "BU01" )
for RowIter = 0 to obj.GetRowCount-1
for ColIter =0 to obj.GetColumnCount-1
set cell = obj.GetCell(RowIter,ColIter)
msgbox(cell.Text)
next
next
GetCells
file:///C:/Users/Opss/Downloads/QlikViewAPI_html/Button.htm
17/03/2016
Button
Pgina 4 de 11
Returns a set of sheet object cells in the current state of the layout.
Parameters:
Rect (IRect) : Rectangle describing which cells to return
Returns:
Array of cell content objects returned
Earliest version:
7.00
Example:
set obj = ActiveDocument.GetSheetObject( "BU01" )
CellRect = ActiveDocument.GetApplication().GetEmptyRect()
CellRect.Top = 0
CellRect.Left = 0
CellRect.Width = obj.GetColumnCount
CellRect.Height = obj.GetRowCount
set CellMatrix = obj.GetCells( CellRect )
for RowIter=CellRect.Top to CellRect.Height-1
for ColIter=CellRect.Left to CellRect.Width-1
msgbox(CellMatrix(RowIter)(ColIter).Text)
next
next
GetCells2
IArrayOfArrayOfRCCell GetCells2(Integer Left, Integer Top, Integer Width, Integer Height)
Returns a set of sheet object cells in the current state of the layout.
Parameters:
Left (Integer) : left position of index of base cell (0 based)
Top (Integer) : Top position of index of base cell (0 based)
Width (Integer) : Number of cells in horizontal direction
Height (Integer) : Number of cells in vertical direction
Returns:
Array of cell content objects returned
Earliest version:
7.00
Example:
set
w =
h =
set
for
next
GetColumnCount
Integer GetColumnCount()
Returns number of sheet object columns in the current state of the layout.
Earliest version:
7.00
Example:
set obj = ActiveDocument.GetSheetObject( "BU01" )
CellRect = ActiveDocument.GetApplication().GetEmptyRect()
CellRect.Top = 0
CellRect.Left = 0
CellRect.Width = obj.GetColumnCount
CellRect.Height = obj.GetRowCount
set CellMatrix = obj.GetCells( CellRect )
for RowIter=CellRect.Top to CellRect.Height-1
for ColIter=CellRect.Left to CellRect.Width-1
msgbox(CellMatrix(RowIter)(ColIter).Text)
next
next
GetDoc
Document GetDoc()
file:///C:/Users/Opss/Downloads/QlikViewAPI_html/Button.htm
17/03/2016
Button
Pgina 5 de 11
GetFrameDef
IFrame GetFrameDef()
Returns frame, border and caption settings for the sheet object with position rectangles in docunits. Replaces GetFrame from QV5
Earliest version:
6.0x
GetObjectCalcTime
Integer GetObjectCalcTime()
GetObjectId
String GetObjectId()
GetObjectMemoryUsage
Integer GetObjectMemoryUsage()
GetObjectType
short GetObjectType()
GetPrintOptions
IPrinterOptions GetPrintOptions()
GetProperties
IButtonProperties GetProperties()
file:///C:/Users/Opss/Downloads/QlikViewAPI_html/Button.htm
17/03/2016
Button
Pgina 6 de 11
GetRect
IRect GetRect()
GetRelevantSelections
Variant (Array of String) GetRelevantSelections()
GetReplacementObject
LPDISPATCH GetReplacementObject()
GetRowCount
Integer GetRowCount()
Returns number of sheet object rows in the current state of the layout.
Earliest version:
7.00
Example:
set obj = ActiveDocument.GetSheetObject( "BU01" )
CellRect = ActiveDocument.GetApplication().GetEmptyRect()
CellRect.Top = 0
CellRect.Left = 0
CellRect.Width = obj.GetColumnCount
CellRect.Height = obj.GetRowCount
set CellMatrix = obj.GetCells( CellRect )
for RowIter=CellRect.Top to CellRect.Height-1
for ColIter=CellRect.Left to CellRect.Width-1
msgbox(CellMatrix(RowIter)(ColIter).Text)
next
next
GetSheet
Sheet GetSheet()
GetState
Byte GetState()
file:///C:/Users/Opss/Downloads/QlikViewAPI_html/Button.htm
17/03/2016
Button
Pgina 7 de 11
GetStatus
Integer GetStatus()
GetTableAsText
String GetTableAsText(Boolean IncludeLabels)
Returns:
Not implemented for this object type
Earliest version:
5.0x
GetTableInfo
IRCTableInfo GetTableInfo()
GetText
String GetText()
GetZedLevel
Integer GetZedLevel()
IsActive
Boolean IsActive()
IsMaximized
file:///C:/Users/Opss/Downloads/QlikViewAPI_html/Button.htm
17/03/2016
Button
Pgina 8 de 11
Boolean IsMaximized()
IsMinimized
Boolean IsMinimized()
Maximize
Maximize()
Minimize
Minimize()
MoveToSheet
Boolean MoveToSheet(String SheetId)
Returns:
True if operation succeeded
Earliest version:
7.00
Press
Press()
Print
Boolean Print()
Prints the sheet object if printable. Use PrintOut method from VB to avoid conflicts with the VB keyword Print
Earliest version:
4.0x
file:///C:/Users/Opss/Downloads/QlikViewAPI_html/Button.htm
17/03/2016
Button
Pgina 9 de 11
PrintEx
Boolean PrintEx(String PrinterName, Boolean ShowPrinterDlg)
be used
Returns:
Returns true if object is printable
Earliest version:
7.00
PrintOut
Boolean PrintOut()
Prints the sheet object. Same as Print method but to be used from VB where the Print keyword may otherwise cause problems
Earliest version:
5.0x
Restore
Restore()
SendToExcel
Integer SendToExcel()
SetBorder
SetBorder(IFrame Frame)
SetFont
SetFont(IBaseFont Font)
SetFrame
file:///C:/Users/Opss/Downloads/QlikViewAPI_html/Button.htm
17/03/2016
Button
Pgina 10 de 11
Sets frame, border and caption settings for the sheet object.
Parameters:
Frame (IFrame) : Sheet object frame
RectsAlso (Boolean) : True if position/size rectangles to be included
Parts (Variant (Array of short)) : Parts of frame to be set.
Should either be empty (all parts set)
or contain an array containing one element for
each part of the frame to be set. The element
should contain one of the numbers below:
0 BORDER_CHANGE,
1 CAPTION_ON_OFF,
2 LAYER_CHANGE,
3 ALLOWMINIM_CHANGE,
4 ALLOWMAXIM_CHANGE,
5 ALLOWINFO_CHANGE,
6 AUTOMIN_CHANGE,
7 ALLOWMOVESIZE_CHANGE,
8 CONDSHOW_CHANGE,
9 FONT_CHANGE,
10 ADVANCEDCAPTION_CHANGE,
11 MACRO_TRIGGER_CHANGE,
The order of the elements is arbitrary.
Returns:
No return value
Earliest version:
6.0x
SetFrameDef
SetFrameDef(IFrame Frame)
SetLayer
SetLayer(Integer Level)
SetPrintOptions
SetPrintOptions(IPrinterOptions Opt)
SetProperties
SetProperties(IButtonProperties Properties)
file:///C:/Users/Opss/Downloads/QlikViewAPI_html/Button.htm
17/03/2016
Button
Pgina 11 de 11
Parameters:
Properties (IButtonProperties)
Returns:
No return value
Earliest version:
4.0x
Example:
rem ** create new shortcut button - clear except locked **
set newbutton = ActiveDocument.Sheets(0).CreateButton
set prop = newbutton.GetProperties
prop.Text.v = "Clear"
prop.Type = 1
prop.ShortcutFunction = 4
newbutton.SetProperties prop
SetRect
SetRect(IRect WinRect)
Sets the position rectangle for the sheet object. Rectangle must be in pixels.
Parameters:
WinRect (IRect)
Returns:
No return value
Earliest version:
4.0x
WriteXmlPropertiesFile
WriteXmlPropertiesFile(String FileName)
Returns:
No return value
Earliest version:
7.00
file:///C:/Users/Opss/Downloads/QlikViewAPI_html/Button.htm
17/03/2016