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,  <br><br>I need to show the drop down box of the combo cell type when the user presses the Shift + Down arrow key combination.<br><br>Is there any way to do this?<br><br>Thanks.<br><br><br>
  • Replied 8 September 2017, 12:30 pm EST

    <P>Hello,</P>
    <P>You can map the KeyDown event of the combo control and programatically drop down the list on a ShiftDown keystroke.</P> <PRE class=coloredcode> <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></PRE> 
  • 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.<br>
Need extra support?

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

Learn More

Forum Channels