none
Auto Suggest in Ribbon EditBox RRS feed

  • Question

  • Hi,

    One of the requirement is to have a autosuggest editbox in custom ribbon UI. Can this be acheived. Any suggestion or links would be helpful.

    thanks,

    Megarekaa

    Friday, November 25, 2011 7:34 AM

Answers

  • Hello,

    Check this discussion. I believe it is possible to use Windows API to show a listbox below the Ribbon editbox. You can subclass the textbox shown by the Ribbon EditBox to get keyboard events such as {Down} and {Up} in order to select items in the listbox and set the text in the textbox at the same time.


    Regards from Belarus (GMT + 3),

    Andrei Smolin
    Add-in Express Team Leader
    Friday, November 25, 2011 8:19 AM
  • Check Windows and Messages. The chapters are as follows:

    • Window Classes - in particular, you'll need to know the class name of the textbox window that the Ribbon EditBox shows when you enter a text; use Spy++ to find it
    • Window Procedures - "subclassing a window" means replacing its window procedure
    • Messages and Message Queues - the window procedure is purposed for handling messages from keyboard and mouse
    • Hooks - you may need to handle mouse and keyboard events

    Regards from Belarus (GMT + 3),

    Andrei Smolin
    Add-in Express Team Leader
    Saturday, November 26, 2011 6:10 AM

All replies

  • Hello,

    Check this discussion. I believe it is possible to use Windows API to show a listbox below the Ribbon editbox. You can subclass the textbox shown by the Ribbon EditBox to get keyboard events such as {Down} and {Up} in order to select items in the listbox and set the text in the textbox at the same time.


    Regards from Belarus (GMT + 3),

    Andrei Smolin
    Add-in Express Team Leader
    Friday, November 25, 2011 8:19 AM
  • Hi Andrei,

    Thanks for the reply. Can you please provide more information as i'am clueless on how to proceed.

    Thanks,

    Megarekaa

     

    Friday, November 25, 2011 10:34 AM
  • Check Windows and Messages. The chapters are as follows:

    • Window Classes - in particular, you'll need to know the class name of the textbox window that the Ribbon EditBox shows when you enter a text; use Spy++ to find it
    • Window Procedures - "subclassing a window" means replacing its window procedure
    • Messages and Message Queues - the window procedure is purposed for handling messages from keyboard and mouse
    • Hooks - you may need to handle mouse and keyboard events

    Regards from Belarus (GMT + 3),

    Andrei Smolin
    Add-in Express Team Leader
    Saturday, November 26, 2011 6:10 AM