none
Adding a Listbox to a Custom Task Pane RRS feed

  • Question

  • Hi

    Is it possible to add a listbox to a custom task pane (ie user control) using Visual basic (ie visual studio not VBA) other than doing it design mode. When looking up the methods for the user control there was no information.

    It seems as though you can do it using forms however preference is to use a custom task pane.

    Any help would be much appreciated. Thanks

    Tuesday, February 19, 2013 4:16 AM

Answers

  • Hi Tfitzhardinge,

    Thank you for posting in the MSDN Forum.

    What do you mean by saying below?

    It seems as though you can do it using forms however preference is to use a custom task pane.

    Do you mean using System.Windows.Forms; ? What you want to add to task pane is actually a winform control, and the task pane is only a container.

    Best regards,


    Quist Zhang [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Wednesday, February 20, 2013 7:09 AM
    Moderator

All replies

  • Hi Tfitzhardinge,

    Thank you for posting in the MSDN Forum.

    What do you mean by saying below?

    It seems as though you can do it using forms however preference is to use a custom task pane.

    Do you mean using System.Windows.Forms; ? What you want to add to task pane is actually a winform control, and the task pane is only a container.

    Best regards,


    Quist Zhang [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Wednesday, February 20, 2013 7:09 AM
    Moderator
  • You mean add the entire control? Or just generate/update the list for the control?

    Cindy Meister, VSTO/Word MVP, my blog

    Wednesday, February 20, 2013 8:01 AM
    Moderator
  • Quist, sorry I realised that custom task panes (ie user controls) add method creates a user control (thanks Chester). I was just getting my head around what user controls were. I also found out that user controls and forms behave similarly and are both derived form the container control.

    What I will need to is add a list box to the user control and popular the list box with information.

    From researching on MSDN I realised it is possible to allow the user in runtime to drag and drop the listbox entries, to change the order of this list box. Is this so and how do I do it.

    Thanks again for your time

    Thursday, February 21, 2013 1:28 AM
  • I unmarked it, because it has been partially answered in another forum.

    What hasn't been answered is with the list box, can I use I drag and drop method to allow the user in runtime to change the order of the list box by drag and drop?

     
    Thursday, February 21, 2013 4:59 AM
  • Hi Tfitzhardinge,

    I feel the request mentioned in your last reply is a WinForm specific issue.

    I suggest you post it in the Windows Forms Forum where your last issue been solved. 

    Thank you for your understanding.

    Best regards,


    Quist Zhang [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, February 21, 2013 5:15 AM
    Moderator