AnsweredAssumed Answered

Bitmap from My.Resouces On PropertyManagerPage SetPictureLabelByName

Question asked by roberto gennari on Aug 11, 2016
Latest reply on Aug 11, 2016 by roberto gennari




I have a problem when I add a bitmap image on a control in PropertyManagerPage.

In my case I created a SelectionBox and I want to add an custom bitmap, this in my code, but the image dont' show.

The method SetPictureLabelByName works perfectly if I pass the path as string, but I would add the same bitmap in My.Resource.

Is it possibile add a bitmap from My.Resouces?





Dim selection_1_Foro As PropertyManagerPageSelectionbox


controlType = swPropertyManagerPageControlType_e.swControlType_Selectionbox
caption = "Select Hole"

leftAlign= swPropertyManagerPageControlLeftAlign_e.swControlAlign_Indent

options = swAddControlOptions_e.swControlOptions_Enabled+ _


tip = "Select Hole"

        selection_1_Foro = group1.AddControl(ID_selection_1_Foro, controlType, caption, leftAlign, options, tip)

If Not selection_1_Foro Is Nothing Then        
           selection_1_Foro.SetPictureLabelByName(My.Resources.MyImage, My.Resources.MyImage)

            selection_1_Foro.SingleEntityOnly = True

            selection_1_Foro.Height = 15

            ReDim filters(0)

            filters(0) = swSelectType_e.swSelFACES      

            selection_1_Foro.SetSelectionColor(False, swUserPreferenceIntegerValue_e.swSystemColorsSelectedItem1)


End If