Visual Studio Development Bookmark and Share   
 index > Visual Studio Guidance Automation Toolkit > Adding drop down menu using editor
 

Adding drop down menu using editor

hi

I am trying to add a drop down box using the editors. I have a design file called combo1.cs added to my editor folder which contains a single combo box. this is my code inside <GatheringServiceData> tag

<Field ValueName="Priority" Label="Priority (1-5)">

<Editor Type="JobEnqueue.Editors.combo1, JobEnqueueGuidance" />

</Field>

I am not able to see the drop down box when i test thepackage.

thanks,

Apurva

apurva1  Monday, August 20, 2007 3:07 PM
Hi Apurva,

As Adrian suggested, the simplest way to perform such a thing would be to use an enumeration so you get everything for free.

If this isn't good for your needs so you go one level deeper and use the IWindowsFormsEditorService service from your custom editor. This service has a method named DropDownControl that you can use to display your own control. Please look at the docs for more info on this method and other realted ones (i.e. CloseDropDown).

Note that this is really about design-time extensibility of Visual Studio so follow ups should be posted to the VS extensibility forum which is much more on topic than the GAX forum.

thanks,
-Victor.
vga  Tuesday, August 21, 2007 7:06 PM
Hi, this is probably not the answer for your question but if you can use an Enum you will get the Combo editor for free.

-Adrian
Adrian Alonso  Tuesday, August 21, 2007 12:49 AM
Hi Apurva,

As Adrian suggested, the simplest way to perform such a thing would be to use an enumeration so you get everything for free.

If this isn't good for your needs so you go one level deeper and use the IWindowsFormsEditorService service from your custom editor. This service has a method named DropDownControl that you can use to display your own control. Please look at the docs for more info on this method and other realted ones (i.e. CloseDropDown).

Note that this is really about design-time extensibility of Visual Studio so follow ups should be posted to the VS extensibility forum which is much more on topic than the GAX forum.

thanks,
-Victor.
vga  Tuesday, August 21, 2007 7:06 PM

You can use google to search for other answers

Custom Search

More Threads

• Wizard - Field with optional value
• Always publish release build
• The file cannot be opened with the selected editor
• pre/post build events
• Upgrading Repository Factory to run in VS2008
• Creating a Project with a Static Project Folder Name.
• Any Examples of Custom Wizard Panels?
• The procedure entry point EncodePointer could not be located in the dynamic link library kernel32.dll
• Can't create my own action
• Get StrongDataSet reference