/ Forums / Advansys Formativ / Creating Solutions with Formativ / Combo Box After Update / Reply To: Combo Box After Update
Thank you for your post.
You would normally use the OnChange event of the combobox control to do this. I created a simple applet with a form call test that contained a combobox called cbMain. I loaded the combo with three items.
I then associated an event with the OnChange event, and wrote some code to display a message box that shows the ItemIndex of the newly selected item. The first item in the combo has an index of 0, the second 1, etc. You could use this value to load the appropriate image file from disk into an image control.
Heres the code:
Sub Main(Client, GWEvent) test.showmodal End Sub Sub cbMainChange(Sender) MsgBox "Load the image for: " + CStr(test.cbMain.ItemIndex),0,"On Change" End Sub
I hope this helps. Let me know if you require any further assistance.
Regards,
Advansys Support