none
Custom task pane embedded WPF Browser control - Tab key navigation doesnt work RRS feed

  • Question

  • Hi,

    Tab key navigation is not working in Excel for custom task pane that I created (available in given link, since I could not add the image here). I have created a SSO Login web page which I am loading into a Custom Task Pane , I am entering user name in first text box and pressing tab key but the cursor is not going to the next control. Please note that this problem is only occurring when there is no workbook in the xll file, as soon as I opened a workbook tab key navigation started working. Looks like excel is not passing the tab event to the control.

    I was referred to this forum from the excel dna forum where i already asked this question (https://groups.google.com/forum/#!searchin/exceldna/tab/exceldna/nrMco44YrcM/sVGlhVm1fVkJ)

    Please can anybody help with this issue.

    Many Thanks,


    • Edited by Harish Joshi Friday, August 28, 2015 6:37 AM Link correction
    Friday, August 28, 2015 6:36 AM

Answers

  • Hi Edward,

    Thanks for your inputs. These second thread isn't mine, but of a team mate (wasn't aware that he put it there already).

    I was able to find a solution to the issue, by hooking to application level events which are trapped by windows. I used a nuget package (https://github.com/gmamaladze/globalmousekeyhook) too do so. This is uses windows C++ api functions to do so and works fine with just a few small tweaks.

    Finally reverted the above solution (as that was a tweaked solution) and used the solution described at http://stackoverflow.com/questions/30948205/excel-customtaskpane-with-webbrowser-control-keyboard-focus-issues, and it works like a charm.

    Best Regards,

    Harish


    • Marked as answer by Harish Joshi Wednesday, September 2, 2015 3:04 AM
    • Edited by Harish Joshi Wednesday, September 2, 2015 6:26 AM
    Wednesday, September 2, 2015 3:04 AM

All replies

  • Hi Harish,

    >> Please note that this problem is only occurring when there is no workbook in the xll file, as soon as I opened a workbook tab key navigation started working.

    What do you mean with “there is no workbook in the xll file”? Did you mean no sheet in workbook? It would be helpful if you could share us your Excel version.

    In my option, task pane is used for worksheet in workbook, I am not sure why do you want it work without workbook. Under Excel 2013, if you do not have workbook, you will not be able to open the task pane. Of course, as my test, you could use custom pane in Excel 2010 without worksheet. But, I add a user control to excel add-in in Excel 2010, the tab key worked correctly. I suggest you test other controls to check whether this issue happened to the special WPF Browser control.

    In addition, I found a similar thread. Is it yours below? If it is, I suggest you do not post same issue repeat, and keep following.
    Reference: https://social.msdn.microsoft.com/Forums/office/en-US/49df58e4-8974-48d7-93e6-336bf89d4e3e/custom-task-pane-embedded-wpf-browser-control-tab-key-navigation-doesnt-work?forum=exceldev

    Best Regards,

    Edward


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Monday, August 31, 2015 11:17 AM
  • Hi Edward,

    Thanks for your inputs. These second thread isn't mine, but of a team mate (wasn't aware that he put it there already).

    I was able to find a solution to the issue, by hooking to application level events which are trapped by windows. I used a nuget package (https://github.com/gmamaladze/globalmousekeyhook) too do so. This is uses windows C++ api functions to do so and works fine with just a few small tweaks.

    Finally reverted the above solution (as that was a tweaked solution) and used the solution described at http://stackoverflow.com/questions/30948205/excel-customtaskpane-with-webbrowser-control-keyboard-focus-issues, and it works like a charm.

    Best Regards,

    Harish


    • Marked as answer by Harish Joshi Wednesday, September 2, 2015 3:04 AM
    • Edited by Harish Joshi Wednesday, September 2, 2015 6:26 AM
    Wednesday, September 2, 2015 3:04 AM