Community
Participate
Working Groups
We need a way for the possible value service implementations to provide labels and images to be used when presenting the value to the user. A reference usecase for this is the checkbox list property editor when used in conjunction with enum lists. See related Bug 345671.
Enhancement implemented. Content added to the what's new doc. In short, the PossibleValuesService class has two new methods (label and image) that can be overridden by implementations.
Verified image in possible value service shows up in checkbox list property editor. I commented out @PossibleValues in IMultiSelectListGalleryItem and replaced with my own possible value service. I noticed that the slush bucket is no longer the default property editor.
> I commented out @PossibleValues in IMultiSelectListGalleryItem and > replaced with my own possible value service. I noticed that the slush > bucket is no longer the default property editor. This was an unrelated regression. Fixed that. However, the original implementation only used custom labels and images in the checkbox list property editor. The slush bucket property editor didn't use. I decided to go ahead and extend the support there too right now. In the process of broadening the scope of this feature I uncovered a bad flaw in the API. The short of it is that providing custom label and image needs to be separate from the PossibleValuesService. So I removed the new methods from PossibleValuesService and instead created ValueLabelService and ValueImageService. List of places where these are used: 1. checkbox list property editor 2. slush bucket property editor 3. standard list property editor 4. possible values browse dialog I have improved the multi-select list sample in the gallery to show this feature. I have also added an enum list example under multi-select gallery. Note that one can verify #3 and #4 above using the slush-bucket example in the multi-select gallery. That's because the RHS of a slush bucket is a standard list property editor. It's the same code. Activating cell editing on the RHS of a slush bucket will show a browse button that leads to a dialog. Updated the documentation accordingly.
When selecting a checkbox, a new <empty> row is added and them removed (creating a flicker)
> When selecting a checkbox, a new <empty> row is added and them removed > (creating a flicker) Please open a separate bug for that. It seems unrelated.
Verified in gallery sample