Object: SelectionItem
- Updated2024-09-12
- 2 minute(s) read
(Collections | XTable) > Selection > Object: SelectionItem
Object: SelectionItem
The SelectedItem object corresponds to a selection in an extended table in a user dialog box. A selection consists of several adjacent, selected table cells.
The following example displays for each selection block the number of cells, rows, or columns that are selected in the extended table XTable1 or displays whether the whole table is selected:
Dim i, lNumCol, lNumRow If XTable1.SelectedElements.Count > 0 Then If XTable1.SelectedElements(1).IsTable Then Call MsgBoxDisp ("Entire table selected") End If For i = 1 To XTable1.SelectedElements.Count If XTable1.SelectedElements(i).IsRows Then lNumRow = XTable1.SelectedElements(i).LastRow - XTable1.SelectedElements(i).FirstRow + 1 Call MsgBoxDisp (i & ", NumRow:"& lNumRow) ElseIf XTable1.SelectedElements(i).IsCols Then lNumCol = XTable1.SelectedElements(i).LastCol - XTable1.SelectedElements(i).FirstCol + 1 Call MsgBoxDisp (i & ", NumCol:"& lNumCol) ElseIf XTable1.SelectedElements(i).IsCells Then lNumCol = XTable1.SelectedElements(i).LastCol - XTable1.SelectedElements(i).FirstCol + 1 Call MsgBoxDisp (i & ", NumCol:"& lNumCol) lNumRow = XTable1.SelectedElements(i).LastRow - XTable1.SelectedElements(i).FirstRow + 1 Call MsgBoxDisp (i & ", NumRow:"& lNumRow) End If Next End If
See Also
Procedures
Checking a User Dialog Box Entry | Creating a Dynamic User Dialog Box | Creating a Procedure in the Script of a User Dialog Box | Creating a User Dialog Box without Linking Variables | Creating an Extended Table | Displaying Graphics in Selection Lists | Enabling Controls | Responding to User Entries in User Dialog Boxes | Saving and Restoring the Last Dialog Box Position | Saving Control Groups for User Dialog Boxes | Specifying the Default Button | Tabulator Order in a User Dialog Box | Using a Script to Fill a Selection List | Using Channel Selection Lists | Using Hotkeys in a User Dialog Box | Using the Flex Properties
Examples
Checking Dialog Box Entries | Dynamic User Dialog Box | Translating User Dialog Boxes | User Dialog Box for Entering Text and Numbers | User Dialog Box for Sequence Control | User Dialog Box in DIAdem VIEW | User Dialog Box in VIEW for the Calculation of the FFT and Harmonic Frequencies | User Dialog Box with Changing Background Color | User Dialog Box with Curve Preview and Slider Control | User Dialog Box with Extended Table | User Dialog Box with Internet Explorer | User Dialog Box with Scalable Table | User Dialog Box with Selection Lists | User Dialog Box with Selection Lists | User Dialog Box with Subdialog Boxes | User Dialog Box with Tables | User Dialog Box with Tree | Wizard for Tolerance Evaluation