Atozed Forums

Full Version: TIWlistbox show selected item
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,
How do I show which item is selected, I can't find a property to select the color for the selected item.
Oh, the color is clMenuHighlight.
So when this is your backgroundcolor…...
Can one change this?
This color is set by the browser and each browser has its own (you can compare a list box in Chrome and Firefox for instance and see that they differ).

The only possible way to change that is using CSS. Unless it is a requirement that you can't get away from, I *strongly* recommend that you don't go down that route... Each browser has a different way of dealing with styles for internal listbox and combobox elements (the <option> tag) and I don't believe it is possible to get consistent results among browsers, including the mobile ones

You can start here:

https://developer.mozilla.org/en-US/docs...S/:checked

Please notice that you can include the styles using IWForm.ExtraHeader property adding the style tag directly to it as in:

<style>
option:hover {
background: lime;
color: red
}
</style>