Assigning Webstyle from a string

I have a “form” that we place in an iframe on a number of websites. We do not have any control of the the website, so we must adjust the style of each of the forms on the Xojo web application end.

[code]Dim pageStyle as WebStyle
Dim buttonStyle as WebStyle

Select case Page_ID
case 1
pageStyle = Style_001
case 2
pageStyle = Style_002
case 3
pageStyle = Style_003
case 4
pageStyle = Style_004

//Case continue for 50 more cases
end select



Rather than hard code these styles I would rather store them as strings in the database. Could I then use some sort of introspection to get the style assigned by passing a string?

What would the syntax be for doing this:


Why not create a dictionary with the names as keys and styles as values?