PDA

View Full Version : Possible to use [Category("Parameters")] attribute to make a 10-item combobox appear?


ChiTrader2000
03-22-2009, 01:12 PM
Hello,

Is it possible to create a parameter that is visible and editable in the "Backtest" properties dialog box as a combobox that represents a 10-item list?

I am already getting int and bool parameters to appear and be editable on this dialog box using the [Category("Parameters")] attribute, and now I would like to do the same thing with custom lists.

Thanks in advance!
ChiTrader2000

roonius
03-22-2009, 01:27 PM
Hello,

Is it possible to create a parameter that is visible and editable in the "Backtest" properties dialog box as a combobox that represents a 10-item list?

I am already getting int and bool parameters to appear and be editable on this dialog box using the [Category("Parameters")] attribute, and now I would like to do the same thing with custom lists.

Thanks in advance!
ChiTrader2000

look around for info how to use enum

ChiTrader2000
03-22-2009, 04:34 PM
Hello roonius,

Thanks a lot! I made an enum, made a public property of the enum's type, and decorated it with [Category("Parameters")], and it works great. I am using it as a "Please log in" combobox where my users can select their name from the combobox so that when their results are written to the database, their UserId is written as well so we know who did what test.

Thanks again!
ChiTrader2000