Page 1 of 1

Wanna change a text colour within a ComboBox item

Posted: Thu Feb 11, 2021 11:21 am
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