MESCIUS SPREAD for Windows Forms 17.0J
Behavior プロパティ (SideButtonInfo)

<see cref="T:GrapeCity.Win.Spread.InputMan.CellType.SymbolButton" />をクリックしたときの動作を取得または設定します。
構文
'Declaration
 
Public Property Behavior As SideButtonBehavior
public SideButtonBehavior Behavior {get; set;}

プロパティ値

<see cref="T:GrapeCity.Win.Spread.InputMan.CellType.SideButtonBehavior" />列挙体。<see cref="F:GrapeCity.Win.Spread.InputMan.CellType.SideButtonBehavior.SpinUp" />は、<see cref="T:GrapeCity.Win.Spread.InputMan.CellType.SideButtonInfo" />をクリックしたときにスピンアップ動作が実行されることを意味し、<see cref="F:GrapeCity.Win.Spread.InputMan.CellType.SideButtonBehavior.SpinDown" />は、<see cref="T:GrapeCity.Win.Spread.InputMan.CellType.SideButtonInfo" nolink="true" />をクリックしたときにスピンダウン動作が実行されることを意味します。
解説
<remarks> <see cref="F:GrapeCity.Win.Spread.InputMan.CellType.SideButtonBehavior.SpinUp" />に設定すると、<see cref="P:GrapeCity.Win.Spread.InputMan.CellType.SymbolButtonInfo.Symbol" />プロパティは<see cref="F:GrapeCity.Win.Spread.InputMan.CellType.Symbols.Arrow" />に変更され、<see cref="P:GrapeCity.Win.Spread.InputMan.CellType.SymbolButtonInfo.SymbolDirection" />プロパティは<see cref="F:GrapeCity.Win.Spread.InputMan.CellType.SymbolDirection.Up" />に変更され、<see cref="P:GrapeCity.Win.Spread.InputMan.CellType.SymbolButtonInfo.Interval" />プロパティは60に変更されます。<see cref="F:GrapeCity.Win.Spread.InputMan.CellType.SideButtonBehavior.SpinDown" />に設定すると、<see cref="P:GrapeCity.Win.Spread.InputMan.CellType.SymbolButtonInfo.Symbol" nolink="true" />プロパティは<see cref="F:GrapeCity.Win.Spread.InputMan.CellType.Symbols.Arrow" nolink="true" />に変更され、<see cref="P:GrapeCity.Win.Spread.InputMan.CellType.SymbolButtonInfo.SymbolDirection" nolink="true" />プロパティは<see cref="F:GrapeCity.Win.Spread.InputMan.CellType.SymbolDirection.Down" />に変更され、<see cref="P:GrapeCity.Win.Spread.InputMan.CellType.SymbolButtonInfo.Interval" nolink="true" />プロパティは60に変更されます。<see cref="F:GrapeCity.Win.Spread.InputMan.CellType.SideButtonBehavior.SpinDown" nolink="true" />に設定すると、<see cref="P:GrapeCity.Win.Spread.InputMan.CellType.SymbolButtonInfo.Symbol" nolink="true" />プロパティは<see cref="F:GrapeCity.Win.Spread.InputMan.CellType.Symbols.None" />に変更され、<see cref="P:GrapeCity.Win.Spread.InputMan.CellType.SymbolButtonInfo.SymbolDirection" nolink="true" />プロパティは<see cref="F:GrapeCity.Win.Spread.InputMan.CellType.SymbolDirection.Left" />に変更され、<see cref="P:GrapeCity.Win.Spread.InputMan.CellType.SymbolButtonInfo.Interval" nolink="true" />プロパティは0に変更されます。 </remarks>
次のサンプルコードは、Behaviorプロパティを設定します。
GrapeCity.Win.Spread.InputMan.CellType.SideButtonInfo testbutton = new GrapeCity.Win.Spread.InputMan.CellType.SideButtonInfo();
testbutton.Behavior = GrapeCity.Win.Spread.InputMan.CellType.SideButtonBehavior.SpinDown;
testbutton.Delay = 300;
testbutton.Interval = 5;
testbutton.Text = "1";

GrapeCity.Win.Spread.InputMan.CellType.GcDateTimeCellType dateCellType = new GrapeCity.Win.Spread.InputMan.CellType.GcDateTimeCellType();
dateCellType.SideButtons.Add(new GrapeCity.Win.Spread.InputMan.CellType.SideButtonInfo() { Text = "A" });
this.fpSpread1_Sheet1.Columns[0].CellType = dateCellType;

GrapeCity.Win.Spread.InputMan.CellType.GcTextBoxCellType textCellType = new GrapeCity.Win.Spread.InputMan.CellType.GcTextBoxCellType();
textCellType.SideButtons.Add(new GrapeCity.Win.Spread.InputMan.CellType.SideButtonInfo() { Text = "B" });
this.fpSpread1_Sheet1.Columns[1].CellType = textCellType;

GrapeCity.Win.Spread.InputMan.CellType.GcDateTimeCellType dateCellType2 = new GrapeCity.Win.Spread.InputMan.CellType.GcDateTimeCellType();
dateCellType2.SideButtons.Add(testbutton);
this.fpSpread1_Sheet1.Columns[2].CellType = dateCellType2;

void IMCellType_DropDownOpening(object sender, GrapeCity.Win.Spread.InputMan.CellType.DropDownOpeningEventArgs e)
        {
           
           listBox1.Items.Add(e.ByTouch.ToString());
        }

        private void fpSpread1_EditModeOn(object sender, EventArgs e)
        {
            if (fpSpread1.EditingControl is GrapeCity.Win.Spread.InputMan.CellType.GcDateTime)
                ((GrapeCity.Win.Spread.InputMan.CellType.GcDateTime)fpSpread1.EditingControl).DropDownOpening += new EventHandler(IMCellType_DropDownOpening);
        }

        private void fpSpread1_EditModeOff(object sender, EventArgs e)
        {
            if (fpSpread1.EditingControl is GrapeCity.Win.Spread.InputMan.CellType.GcDateTime)
                ((GrapeCity.Win.Spread.InputMan.CellType.GcDateTime)fpSpread1.EditingControl).DropDownOpening -= new EventHandler(IMCellType_DropDownOpening);
        }
Dim testbutton As New GrapeCity.Win.Spread.InputMan.CellType.SideButtonInfo()
testbutton.Behavior = GrapeCity.Win.Spread.InputMan.CellType.SideButtonBehavior.SpinDown
testbutton.Delay = 300
testbutton.Interval = 5
testbutton.Text = "1"

Dim dateCellType As New GrapeCity.Win.Spread.InputMan.CellType.GcDateTimeCellType()
dateCellType.SideButtons.Add(New GrapeCity.Win.Spread.InputMan.CellType.SideButtonInfo() With {.Text = "A"})
FpSpread1_Sheet1.Columns(0).CellType = dateCellType

Dim textCellType = New GrapeCity.Win.Spread.InputMan.CellType.GcTextBoxCellType()
textCellType.SideButtons.Add(New GrapeCity.Win.Spread.InputMan.CellType.SideButtonInfo() With {.Text = "B"})
FpSpread1_Sheet1.Columns(1).CellType = textCellType

Dim dateCellType2 As New GrapeCity.Win.Spread.InputMan.CellType.GcDateTimeCellType()
dateCellType2.SideButtons.Add(testbutton)
FpSpread1_Sheet1.Columns(2).CellType = dateCellType2


Private Sub IMCellType_DropDownOpening(ByVal sender As Object, ByVal e As GrapeCity.Win.Spread.InputMan.CellType.DropDownOpeningEventArgs)
        ListBox1.Items.Add(e.ByTouch.ToString())
    End Sub

Private Sub FpSpread1_EditModeOff(sender As Object, e As EventArgs) Handles FpSpread1.EditModeOff
        If TypeOf (FpSpread1.EditingControl) Is GrapeCity.Win.Spread.InputMan.CellType.GcDateTime Then
            RemoveHandler CType(FpSpread1.EditingControl, GrapeCity.Win.Spread.InputMan.CellType.GcDateTime).DropDownOpening, AddressOf IMCellType_DropDownOpening
        End If
    End Sub

    Private Sub FpSpread1_EditModeOn(sender As Object, e As EventArgs) Handles FpSpread1.EditModeOn
        If TypeOf (FpSpread1.EditingControl) Is GrapeCity.Win.Spread.InputMan.CellType.GcDateTime Then
            AddHandler CType(FpSpread1.EditingControl, GrapeCity.Win.Spread.InputMan.CellType.GcDateTime).DropDownOpening, AddressOf IMCellType_DropDownOpening
        End If
    End Sub
参照

SideButtonInfo クラス
SideButtonInfo メンバ

 

 


© MESCIUS inc. All rights reserved.