Customizing the Grid's Appearance > Highlighting the Current Row or Cell > MarqueeStyle 6 - Floating Editor |
This is the default marquee style of the grid. The cell text (the actual text only, not the entire cell) is highlighted and there is a blinking text cursor (caret) at the end of the text.
The color of the highlight is your system's highlight color. The floating editor style simulates the look and feel of the Microsoft Access datasheet. The blinking text cursor indicates that the cell is edit-ready, hence the name floating editor for this marquee style. Since no other marquee style places the cell in a similar edit-ready mode, the behavior of the grid with the floating editor is sometimes different from the other marquee styles. The following list summarizes the differences when the MarqueeStyle property is set to 6 - Floating Editor:
The following properties are ignored by the floating editor: EditBackColor, EditDropDown, EditForeColor, EditorStyle, and MarqueeUnique.
When using the AddCellStyle and AddRegexCellStyle methods with the floating editor, the grid ignores the current cell bit (dbgCurrentCell) and highlighted row bit (dbgMarqueeRow) of the Condition argument. For more details, see Applying Styles to Cells.
The floating editor will not be displayed in a cell with radio buttons or a picture, as described in Automatic Data Translation with ValueItems. A dotted cell marquee will be used instead. The floating editor highlight will return when the current cell is changed to one with normal text display.
The CycleOnClick property (applies to ValueItems collection) has no effect when the MarqueeStyle property is set to 6 - Floating Editor.
The drag-and-drop features described in Drag-and-Drop Behavior will not work as well as they do with other marquee styles. Users will not be able to begin dragging a cell to trigger the DragCell event unless they manage to grab the narrow region between the floating editor and either column divider. This is because the floating editor is itself a control and is preventing the grid cell from detecting the drag.
The DblClick event of the TDBGrid control does not fire when the user double-clicks a non-current cell within the grid. This is because the first click is used by the floating editor to begin editing, placing the cell into edit mode at the character on which the click occurred. Double-clicking the current cell of the grid fires the DblClick event normally, however.