Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
TIWlistbox show selected item
#1
Hi,
How do I show which item is selected, I can't find a property to select the color for the selected item.
Reply
#2
Oh, the color is clMenuHighlight.
So when this is your backgroundcolor…...
Can one change this?
Reply
#3
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>
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)