How can I make any one line of a listbox, textbox or datagrid a different color to the other lines? Similar to the highkiting you get whe you select a line in a list box but not related to where you click the mouse position.
A textbox and a listbox can only have one color and one type of font in them. Use a RichTextBox, highlight the text to be changed and use its SelFontName, SelColor, SelUnderline, SelBold, SelItalic, etc. properties.
I know in a MSHFlexGrid you can change the colors and fonts. Here's an example of code to do this (hfg is the MSHFlexGrid):
For x = 0 To hfg.Cols - 1
hfg.Col = x
hfg.Row = 'Row you want to change the color of
hfg.CellBackColor = 'color you want to change it to
Next x
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.