|
|
|
|
|
SpreadsheetStyleSelection (Function) In french: TableurStyleSélection Returns or modifies the style of selected cells in a Spreadsheet control found in a window.
SpreadsheetStyleSelection(TBLR_Tableur, psheetBold, True)
SpreadsheetSelectPlus(TBLR_Tableur, "B1")
SpreadsheetStyleSelection(TBLR_Tableur, psheetBold, True)
sRes is boolean = SpreadsheetStyleSelection(TBLR_Tableur, psheetBold)
Syntax
Finding out the selection style Hide the details
<Result> = SpreadsheetStyleSelection(<Spreadsheet control> , <Attribute>)
<Result>: Type of expected result Requested attribute. <Spreadsheet control>: Control name Name of the Spreadsheet control to be used. <Attribute>: Integer constant Attribute to find out: | | psheetAlignmentH | Horizontal alignment. In this case, <Result> can correspond to: - haCenter: Centered alignment.
- haRight: Right alignment.
- haLeft: Alignment to left.
| psheetAlignmentV | Vertical alignment. In this case, <Result> can correspond to: - vaBottom: Alignment at bottom.
- vaTop: Alignment at top.
- vaMiddle: Alignment in the middle.
| psheetAutomaticLineWrap | Management of automatic line wrap. In this case, <Result> can correspond to: - True to use the automatic line wrap,
- False not to use the automatic line wrap.
| psheetBackgroundColor | Text background color. In this case, <Result> can correspond to: | psheetBold | Bold cell text. In this case, <Result> can correspond to: - True to display in bold,
- False not to display in bold.
| psheetFontAngle | Text rotation angle. In this case, <Result> can correspond to an integer included between -180 and +180. | psheetFontName | Name of font used. In this case, <Result> can correspond to a character string containing the font name. | psheetFontSize | Font size. In this case, <Result> corresponds to the font size (integer). | psheetItalic | Italic cell text. In this case, <Result> can correspond to: - True to display in italic,
- False not to display in italic.
| psheetStrikeOut | Cell text crossed out. In this case, <Result> can correspond to: - True to strike out,
- False not to strike out.
| psheetTextColor | Text color. In this case, <Result> can correspond to: | psheetUnderlined | Underlined cell text. In this case, <Result> can correspond to: - True to underline,
- False not to underline.
|
Modifying the selection style Hide the details
SpreadsheetStyleSelection(<Spreadsheet control> , <Attribute> , <Value>)
<Spreadsheet control>: Control name Name of the Spreadsheet control to be used. <Attribute>: Integer constant Attribute to modify. This element can correspond to: | | psheetAlignmentH | Horizontal alignment. In this case, <Value> can correspond to: - haCenter: Centered alignment.
- haRight: Right alignment.
- haLeft: Alignment to left.
| psheetAlignmentV | Vertical alignment. In this case, <Value> can correspond to: - vaBottom: Alignment at bottom.
- vaTop: Alignment at top.
- vaMiddle: Alignment in the middle.
| psheetFontAngle | Text rotation angle. In this case, <Value> can correspond to an integer included between -180 and +180. | psheetStrikeOut | Cell text crossed out. In this case, <Value> can correspond to: - True to strike out,
- False not to strike out.
| psheetBackgroundColor | Text background color. In this case, <Value> can correspond to: | psheetTextColor | Text color. In this case, <Value> can correspond to: | psheetBold | Bold cell text. In this case, <Value> can correspond to: - True to display in bold,
- False not to display in bold.
| psheetItalic | Italic cell text. In this case, <Value> can correspond to: - True to display in italic,
- False not to display in italic.
| psheetFontName | Name of font used. In this case, <Value> can correspond to a character string containing the font name. | psheetAutomaticLineWrap | Management of automatic line wrap. In this case, <Value> can correspond to: - True to use the automatic line wrap,
- False not to use the automatic line wrap.
| psheetUnderlined | Underlined cell text. In this case, <Value> can correspond to: - True to underline,
- False not to underline.
| psheetFontSize | Font size. In this case, <Value> corresponds to the font size (integer). |
<Value>: Variant Value that will be given to the attribute. Remarks - The modify operation is added into the list of operations to cancel: the user can undo this operation via the context menu or by pressing Ctrl + Z.
- This function can only be used on a Spreadsheet control found in a window.
Related Examples:
|
Unit examples (WINDEV): The Spreadsheet control
[ + ] Using the Spreadsheet control. This example explains how to: - load an xlsx file in a spreadsheet control, - save the spreadsheet in a file, - fill the control with data coming from the database, - insert rows, columns, - access the cells and handle them (modify their value, their style, ...), - enter formulas, - ...
|
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|