How to bind generic array to listbox? #2059
Answered
by
cwensley
Shadowblitz16
asked this question in
Q&A
-
How do I bind a generic array to a listbox? public class EntityPickerForm<TEntity, TEntityConfig> : Form where TEntity : Entity<TEntityConfig> where TEntityConfig : EntityConfig, new()
{
ListBox EntityListBox { get; }
Button EntityEditBtn { get; }
Button EntityDoneBtn { get; }
public TEntity[] Items { get; } = new TEntity[256];
public EntityPickerForm()
{
EntityListBox = new ListBox();
EntityListBox.Items.
EntityListBox.Bind("Item", this, )
}
}``` |
Beta Was this translation helpful? Give feedback.
Answered by
cwensley
Nov 16, 2021
Replies: 1 comment
-
Not quite sure how binding will help here, simply just set the
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Shadowblitz16
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Not quite sure how binding will help here, simply just set the
ListBox.DataStore
to your Items array. e.g.