PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
New WINDEV 23 feature!
  • Properties specific to the description of psheetSelection variables
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
The psheetSelection type is used to find out the advanced characteristics of a selection in a Spreadsheet control. The characteristics of this selection are returned by several WLanguage properties.
..Selection is used to get a psheetSelection variable.
Note: See Declaring a variable for more details.
Example
sel is psheetSelection = PSHEET_MySpreadsheet..Selection
IF sel..Type = psheetSelSimpleCell THEN
// Display the cell name in the status bar
STATUSBAR = sel..MinCell
END
t is psheetSelection
t = PSHEET_NoName1..Selection
SWITCH t..Type
CASE psheetSelSimpleCell: Trace("You've selected psheetSelSimpleCell")
CASE psheetSelSimpleHeader: Trace("You've selected psheetSelSimpleHeader")
CASE psheetSelMultiCell: Trace("You've selected psheetSelMultiCell")
CASE psheetSelMultiHeader: Trace("You've selected psheetSelMultiHeader")
CASE psheetSelRectCell: Trace("You've selected psheetSelRectCell")
CASE psheetSelEmpty: Trace("You've selected psheetSelEmpty")
CASE psheetSelAll: Trace("You've selected psheetSelAll")
OTHER CASE
END

te is array of strings = t..Header
tc is array of strings = t..Cell
Trc is array of strings = t..RectCell
Trace("-----------------------------")
Trace("")

Trace("Min cell:", t..MinCell)
Trace("Max cell:", t..MaxCell)
Trace("-----------------------------")
Trace("")

Trace("Browse of headers")
FOR i = 1 TO te..Occurrence
Trace("header " + i + ":", te[i])
END
Trace("-----------------------------")
Trace("")

Trace("Browse of cells")
FOR i = 1 TO tc..Occurrence
Trace("cell " + i + ":", tc[i])
END
Trace("-----------------------------")
Trace("")

Trace("Browse of rectangle of cells")
FOR i = 1 TO Trc..Occurrence
Trace("rect cell " + i + ":", Trc[i])
END
Trace("-----------------------------")
Trace("")
Remarks

Properties specific to the description of psheetSelection variables

The following properties can be used to handle a selection in a Spreadsheet control:
Property nameType usedEffect
CellArray of stringsArray of selected cells. The cells are sorted according to the selection order.
This property is available in read-only.
MaxCellCharacter stringMaximum selected cell, which means the cell found at the bottom right of the rectangle defining the selection of cells.
This property is available in read-only.
MinCellCharacter stringMinimum selected cell, which means the cell found at the top left of the rectangle defining the selection of cells.
This property is available in read-only.
HeaderArray of stringsSelected headers (headers of selected rows and/or columns).
This property is available in read-only.
RectCellArray of stringsArray of rectangles of selected cells. Example: "A1:B2"
This property is available in read-only.
TypeInteger constantType of selection:
  • psheetSelMultiCell: Several cells are selected.
  • psheetSelMultiHeader: Several headers are selected.
  • psheetSelRectCell: Several cells are selected and they define a rectangle.
  • psheetSelSimpleCell: A single cell is selected.
  • psheetSelSimpleHeader: A single header is selected.
  • psheetSelAll: The entire worksheet is selected.
  • psheetSelEmpty: No selection.
This property is available in read-only.


Note: These properties can be handled by using one of the following syntaxes:
  • <Variable Name>..<Property Name>
  • <Variable Name>.<Property Name>
Minimum required version
  • Version 23
This page is also available for…
Comments
Click [Add] to post a comment