ComboBox ! need help

Im trying to make it so when i select an item already in my combobox to show a picture in my canvas and if i select a different item in the combobox it show a different picture so forth and so forth and i need to have it if anyone types Any thing else it display this other picture. but i can’t even get it working with just switch when i select a different picture . i can get it to show one picture but not if i put it in any event in the combobox. any ideas? heres the code i have. i Have one Property called Front29M_S and its set as a Picture. this is in the Canvas:[quote] Dim scaleX, scaleY, scale as Double
Dim theLeft, theTop as integer

if Front29M_S <> nil And ComboBox1.Text = “T-Shirt 29M” then //Logo is a property that has been added to the window
if Front29M_S.width <= canvas2.width and Front29M_S.height <= canvas2.height then //if pic is smaller than the canvas
theLeft = (canvas2.width - Front29M_S.width)/2 //center the image horizontally
theTop = (canvas2.height - Front29M_S.height)/2 //center the image vertically
g.DrawPicture Front29M_S, theLeft, theTop
else
scaleX = canvas2.width / Front29M_S.width
scaleY = canvas2.height / Front29m_S.height
scale = Min( scaleX, scaleY ) //choose the smaller value
theLeft = (canvas2.width - (Front29M_S.widthscale))/2 //center the image horizontally
theTop = (canvas2.height - (Front29M_S.height
scale))/2 //center the image vertically
g.DrawPicture Front29M_S, theLeft, theTop, Front29M_S.width * scale, Front29M_S.height * scale, 0, 0, Front29M_S.width, Front29M_S.height
end if
end if
[/quote]
I don’t know what event in the combobox i need to put this.[quote] Dim FrontFile as FolderItem

FrontFile = GetFolderItem("/Users/tracynolte/Documents/InvoiceProgram/img/Front29M_S.png", FolderItem.PathTypeShell)
if FrontFile <> nil then
Front29M_S = FrontFile.OpenAsPicture //pic is a property that has been added to the window
if Front29M_S <> nil then
canvas2.refresh//forces the canvas to display the scaled image
else

end if

end if[/quote]

i put the [quote]Dim FrontFile as FolderItem

FrontFile = GetFolderItem("/Users/tracynolte/Documents/InvoiceProgram/img/Front29M_S.png", FolderItem.PathTypeShell)
if FrontFile <> nil then
Front29M_S = FrontFile.OpenAsPicture //pic is a property that has been added to the window
if Front29M_S <> nil then
canvas2.refresh//forces the canvas to display the scaled image
else

end if
end if[/quote] in the open and it displays it now i need to have it check for what item is selected in the ComboBox . any ideas ?

In your ComboBox’s Change event, get the Text value and act upon what is returned.