|
|
|
SftTree.StartCombo Method |
Starts editing the specified cell using a combo box.
Deprecated - Provided for compatibility with earlier versions only - See Cell Editing
This method continues to be used with Internet Explorer as it does not support
the new cell editing mechanisms introduced with SftTree/OCX 7.0.
Syntax
VB.NET |
object.StartCombo(ByVal ItemIndex As Integer, ByVal ColIndex As Short, ByVal Strings As String, ByVal Delim As String) |
||
VB |
object.StartCombo(ByVal ItemIndex As Long, ByVal ColIndex As Integer, ByVal Strings As String, ByVal Delim As String) |
||
C#.NET |
void object.StartCombo(int ItemIndex, short ColIndex, string Strings, string Delim); |
||
VC++ |
HRESULT object->StartCombo(long ItemIndex, short ColIndex, _bstr_t Strings, _bstr_t Delim); |
||
C |
HRESULT object->raw_StartCombo(long ItemIndex, short ColIndex, BSTR Strings, BSTR Delim); |
||
Delphi |
procedure object.StartCombo(ItemIndex : Integer, ColIndex : Smallint, Strings : WideString, Delim : WideString); |
object
A SftTree object.
ItemIndex
The zero-based item index. The combination of ItemIndex and ColIndex describes an individual cell.
ColIndex
The zero-based column number. The combination of ItemIndex and ColIndex describes an individual cell.
Strings
The contents of the combo box drop-down list. The string specifies all possible selections by separating each substring using the first character identified by Delim.
Delim
The delimiter separating each substring in Strings.
Comments
Deprecated - Provided for compatibility with earlier versions only - See Cell Editing
This method continues to be used with Internet Explorer as it does not support
the new cell editing mechanisms introduced with SftTree/OCX 7.0.
The StartCombo method starts editing the specified cell using a combo box.
A combo box is displayed in the cell specified by ItemIndex and ColIndex. If the cell is not currently displayed, it is scrolled into view first. The combo box is initialized with the substrings specified by the Strings value. If the current cell text matches one of the substrings, that string is selected in the combo box. The drop-down portion of the combo box is made visible. The user can make a selection from the offered substrings. Text cannot be entered using the keyboard. The StartComboEdit method allows data entry in addition to offering a selection. The StartEdit method allows data entry without offering a selection.
The delimiter specified by Delim should be a String containing one character. Any additional characters are ignored.
The ItemEditFont property can be used to define the font used for cell editing. Using the CellEditStyle property, the combo box control's height can be controlled.
There are two methods to handle cell editing events based on the CellEventHandling property:
CellEventHandling = False
If the user clicks a mouse button outside of the cell being edited or presses the TAB or ENTER key, the AfterEdit event is generated. This allows the application to perform input validation and other cleanup processing. If Cancel = False, the text selected replaces the cell's text. If Cancel = True, cell editing is not ended.
If the user presses the ESCAPE key, cell editing is ended and the original cell text is restored. An AfterEdit event is not generated. Any data the user entered or selected is lost.
Once cell editing has ended (or was aborted by the user), the PostEdit event is generated.
CellEventHandling = True
If the user clicks a mouse button outside of the cell being edited, the AfterEdit event is generated.
This allows the application to perform input validation and other cleanup processing.
If Cancel = False, the text selected replaces the cell's text. If
Cancel = True, cell editing is not ended.
The ENTER or TAB keys do not end cell editing and must be handled by the CEKeyDown or CEKeyPress event.
Using these events, an application can implement cell motion, moving from one cell to the next in response to keystrokes.
If the user presses the ESCAPE key, cell editing is ended and the original cell text is restored. An AfterEdit event is not generated. Any data the user entered or selected is lost.
Once cell editing has ended (or was aborted by the user), the PostEdit event is generated.
See Also SftTree Object | Object Hierarchy