FlexPivot for WinForms
OwnerDrawOutlineButton イベント (C1FlexGridBase)

C1.Win.C1FlexGrid.4.5.2 アセンブリ > C1.Win.C1FlexGrid 名前空間 > C1FlexGridBase クラス : OwnerDrawOutlineButton イベント
Fires before the grid draws a tree outline button, when the DrawMode property is set to DrawModeEnum.OwnerDraw.
シンタックス
'宣言
 
Public Event OwnerDrawOutlineButton As System.EventHandler(Of OwnerDrawOutlineButtonEventArgs)
public event System.EventHandler<OwnerDrawOutlineButtonEventArgs> OwnerDrawOutlineButton
イベント データ

イベント ハンドラが、このイベントに関連するデータを含む、OwnerDrawOutlineButtonEventArgs 型の引数を受け取りました。次の OwnerDrawOutlineButtonEventArgs プロパティには、このイベントの固有の情報が記載されます。

プロパティ解説
Get the rectangle where the outline button will be painted (in client coordinates).  
Get column index of the cell which contains the outline button being painted.  
Gets the Graphics object used to draw the outline button. Use this object to draw custom elements in the outline button.  
Gets or sets whether the event has finished drawing the outline button.  
Gets or sets the image that will be displayed in the cell.  
Get the level of the tree which will be collapsed by clicking on the outline button.  
Get the row index of the cell which contains the outline button being painted.  
Sets or sets the CellStyle object used to paint the outline button.  
Gets or sets the text that will be displayed in the outline button.  
解説

The OnOwnerDrawOutlineButton event only fires when the DrawMode property is set to DrawModeEnum.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 OwnerDrawOutlineButtonEventArgs.DrawOutlineButton 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.
参照