Language

DataGridViewHeaderCell.MouseDownUnsharesRow メソッド

定義

ポインターが行のセル上にある間にマウス ボタンを押したままにすると、行の共有が解除されるかどうかを示します。

protected:
 override bool MouseDownUnsharesRow(System::Windows::Forms::DataGridViewCellMouseEventArgs ^ e);
protected override bool MouseDownUnsharesRow(System.Windows.Forms.DataGridViewCellMouseEventArgs e);
override this.MouseDownUnsharesRow : System.Windows.Forms.DataGridViewCellMouseEventArgs -> bool
Protected Overrides Function MouseDownUnsharesRow (e As DataGridViewCellMouseEventArgs) As Boolean

パラメーター

e
DataGridViewCellMouseEventArgs

マウスの位置に関する情報を含む DataGridViewCellMouseEventArgs 。

戻り値

true ユーザーがマウスの左ボタンでクリックすると、ビジュアル スタイルが有効になり、 EnableHeadersVisualStyles プロパティが trueされ、 DataGridView プロパティが nullされません。それ以外の場合は false。

注釈

ビジュアル スタイルを有効にする方法の詳細については、 Application.EnableVisualStyles メソッドを参照してください。

MouseDownUnsharesRow は、 OnMouseDownの直前に呼び出されます。 trueの呼び出しが行OnMouseDownの共有を解除する効果がある場合は、rowIndexを返す必要があります。 それ以外の場合 false 返す必要があります。

行共有の詳細については、「 Windows フォーム DataGridView コントロールのスケーリングのベスト プラクティス」を参照してください。

適用対象

関連項目