Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request: Support SuggestedValuesAttribute #134

Open
JamesBalisciano opened this issue May 22, 2023 · 0 comments
Open

Request: Support SuggestedValuesAttribute #134

JamesBalisciano opened this issue May 22, 2023 · 0 comments

Comments

@JamesBalisciano
Copy link

Currently, it does not appear that SuggestedValuesAttribute is supported in the manner expected.

Steps to reproduce:

  1. Create a new Instrument class definied as:
[Display("MyInstrument")]
public class MyInstrument : Instrument
{
    [Display("My String")]
    [SuggestedValues(nameof(Values))]
    public string MySetting { get; set; }

    public string[] Values => new[] { "One", "Two", "Three" };

    public MyInstrument()
    {
        Name = "My Instrument";
        MySetting = string.Empty;
    }
}
  1. In the Editor, this works as expected. An editable combo box allows manual entry or selection from the suggested array.
  2. In TUI, only manual entry seems to be allowed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant