RobotStudio event

Bind picture to combobox

Options
Hi,
 

I have made screen where the operator can choose different programs in a combobox.

What I want to do is to show a picture of the actual part that belongs to the actual program that has been chosen from the combobox. So in some way I have to connect and show the right picture with the chosen program from the combobox.

 

Are there anyone who knows how to do this or has an example?

 

I use SM 5.12.

 

Best regards M Johnson

Comments

  • Abhishek PM
    Options
    Hi,
     

    The combox in ScreenMaker cannot have a picture embedded into it along with the text.  There may be way to do it using a combination of Visual Studio and FlexPendant SDK.
  • Hi,
     

    No, of course the picture can't be embedded with the text, but for example the indexnumber of the combobox can maybe be used for showing the right picture...??

     

    M Johnson
  • Abhishek PM
    Options
    Hi,
     

    There is a way you can show a picture in corresponding to the index in the comboBox.

    You need to first have a picture box added on to your screen. Set the AllowMultipleStates property of the control to True. Add items into state collection mapping the index with the image. Bind the selectedIndex property to an application variable.

     

    Bind the SelectedIndex property of combo box to the same application variable.

     

    Based on the change of the index in comboBox a different image must appear in the picturebox. This could be a solution to your problem.
  • Hi again,
     

    Thanks, it works good!

     

    M Johnson