Wanna change a text colour within a ComboBox item

Just starting out? Need help? Post your questions and find answers here.
User avatar
Kurzer
Posts: 90
Joined: Mon May 26, 2014 9:33 am

Wanna change a text colour within a ComboBox item

Post by Kurzer »

Hello folks,

I try to hide/highlight some parts of a ComboBox entry by injecting a html colour command, but this does not work.

Here is my attempt snippet:

Code: Select all

  If OpenWindow(0, 0, 0, 270, 85, "ComboBoxGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
    ComboBoxGadget(0, 10, 50, 250, 25)
    For Index = 0 To 5
      AddGadgetItem(0, -1, "ComboBox item " + ~"\" </div> <div style=\"color:white\"> " + ~"\"This text schould be in white color")
    Next
  EndIf
The resulting HTML looks like this:
Image

Does anyone know why the injected <div> element is not interpreted as such?

Markus
SB 2.32 x86, Browser: Iron Portable V. 88.0.4500.0 (Chromium based), User age in 2023: 55y
"Happiness is a pet." | "Never run a changing system!"