Combo Cell Type - other way to see drop down

Posted by: sagar-fp on 8 September 2017, 12:30 pm EST

  • Posted 8 September 2017, 12:30 pm EST

    Hi, 

    I need to show the drop down box of the combo cell type when the user presses the Shift + Down arrow key combination.

    Is there any way to do this?

    Thanks.


  • Replied 8 September 2017, 12:30 pm EST

    Hello,


    You can map the KeyDown event of the combo control and programatically drop down the list on a ShiftDown keystroke.

     
    	<SPAN class=kwd>Private Sub</SPAN> FpSpread1_EditModeOn(<SPAN class=kwd>ByVal</SPAN> sender <SPAN class=kwd>As Object</SPAN>, <SPAN class=kwd>ByVal</SPAN> e <SPAN class=kwd>As</SPAN> System.EventArgs) <SPAN class=kwd>Handles</SPAN> FpSpread1.EditModeOn
    <SPAN class=kwd>Dim</SPAN> c <SPAN class=kwd>As</SPAN> FarPoint.Win.FpCombo
    <SPAN class=kwd>If</SPAN> FpSpread1.ActiveSheet.ActiveColumnIndex = 1 <SPAN class=kwd>Then</SPAN>
    c = <SPAN class=kwd>CType</SPAN>(FpSpread1.EditingControl, FarPoint.Win.FpCombo)
    <SPAN class=kwd>AddHandler</SPAN> c.KeyDown, <SPAN class=kwd>AddressOf</SPAN> comboKD
    <SPAN class=kwd>End If
    End Sub

    Public Sub</SPAN> comboKD(<SPAN class=kwd>ByVal</SPAN> sender <SPAN class=kwd>As Object</SPAN>, <SPAN class=kwd>ByVal</SPAN> e <SPAN class=kwd>As</SPAN> System.Windows.Forms.KeyEventArgs)
    <SPAN class=kwd>Dim</SPAN> c <SPAN class=kwd>As</SPAN> FarPoint.Win.FpCombo = <SPAN class=kwd>CType</SPAN>(sender, FarPoint.Win.FpCombo)
    <SPAN class=kwd>If</SPAN> e.KeyCode = Keys.Down <SPAN class=kwd>And</SPAN> e.Shift <SPAN class=kwd>Then</SPAN>
    c.DroppedDown = <SPAN class=kwd>True
    End If
    End Sub</SPAN>
     
  • Replied 8 September 2017, 12:30 pm EST

    Or you could add the Shift DownArrow key combo into your InputMap and specify the ShowSubEditor action.
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels