Page 1 of 1

Listbox Background and Foreground Color

Posted: Wed Feb 22, 2012 1:50 pm
by Darren
Can anybody help?

Can anybody tell me how to set the background color of a listbox to black and the text color to white.

Here is my code, I cannot get it to work????

OBJECT ListBox1 AS ListBox
    Left=0
    Top=0
    Width=150
    Height=ScreenHeight - 25
    TabOrder=0
    Sorted=True
    Color=0
    Font.Color=255
  END OBJECT `{ListBoxBox1}

Many thanks in advance!!!

Listbox Background and Foreground Color

Posted: Wed Feb 22, 2012 2:34 pm
by Angel
The? white color is rgb(255,255,255) or 16777215 or &HFFFFFF.
In your code, the text color es 255 (red color)? and not white color.
I recommend that you download my program "update colormanagement" in the section files.

`Code
Object frmForm As Form
? Caption="Form1"
? Height=480
? Width=640
? Center
? `Otros objetos
? Object Listbox1 As Listbox
? ? Left=0
? ? Top=0
? ? Width=150
? ? Height=Screenheight - 25
? ? Taborder=0
? ? Sorted=True
? ? Color=0
? ? Listbox1.Additem("Probando")
? ? Font.Color=Rgb(255,255,255)
? END OBJECT `{ListBoxBox1}
? `Fin otros objetos
? `OnShow=frmForm_OnShow
? `OnClose=frmForm_OnClose
End Object
frmForm.showmodal