[]
        
(Showing Draft Content)

C1.Win.FlexGrid.C1FlexGridBase.OwnerDrawOutlineButton

OwnerDrawOutlineButton Event

Fires before the grid draws a tree outline button, when the DrawMode property is set to OwnerDraw.

Namespace: C1.Win.FlexGrid
Assembly: C1.Win.FlexGrid.8.dll
Syntax
public event EventHandler<OwnerDrawOutlineButtonEventArgs> OwnerDrawOutlineButton
Returns
Type Description
EventHandler<OwnerDrawOutlineButtonEventArgs> Fires before the grid draws a tree outline button, when the property is set to .
Remarks

The OnOwnerDrawOutlineButton event only fires when the DrawMode property is set to OwnerDraw.

You can use this event to customize the appearance of tree outline button in the grid. The event allows three main types of customization:

  1. Change the value of the Text and Image parameters to modify the values displayed by the grid. You can use this type of customization to replace level strings with + or - symbols, for example.
  2. Change the Style property to display the outline button using a different style than the one selected by the grid by default.
  3. Use the Graphics and Bounds parameters and draw the tree outline button yourself. When drawing outline buttons this way, you may call the DrawOutlineButton(DrawCellFlags) member to force the grid to draw specific parts of the outline button, while your code draws other parts. For example, you could paint a custom background and then call DrawCell to have the grid paint the outline button border and contents.