I have a SingleChoiceAction which I'd like to use to set the status of the selected objects in a view.
The possible status values come from a lookup table, which also contains a SmallIcon property which I'd like to use for the image of the items but the ChoiceActionItem only has an ImageName property to use an Embedded Resource.
How do I use the images from the database instead? Putting the images as Embedded Resources defeats the object of storing them in the database - any new values would require the addition of a new Embedded Resource, a programming change.
Dim objectspace As IObjectSpace = objView.ObjectSpace
SetDataAction.Items.Clear()
setStatusItem = New ChoiceActionItem("Status", "Status", Nothing)
SetDataAction.Items.Add(setStatusItem)
For Each ps As ProspectStatus In objectspace.GetObjects(Of ProspectStatus)(New BinaryOperator("Withdrawn", False)).OrderBy(Function(ps1) ps1.DisplayOrder)
Dim item As New ChoiceActionItem(ps.Description, ps)
'item.ImageName = ImageLoader.Instance…
setStatusItem.Items.Add(item)
Next