Author Topic: GuiTextListCtrl Colors  (Read 2886 times)

/title
I know that the server list does it, but how do you add a row to a GuiTextListCtrl with different colors? I've tried using dump, trace, and the <color> tags, but I can't think of anything else. Anyone know how to do this?

You can't.

You can always have a GuiSwatchCtrl as the scroll's child and then have the swatch's children GuiMLTextCtrls.

You can't.
You can.

From some quick experimentation:

Create a new profile for the TextListCtrl


new GuiControlProfile(GuiTextListProfile) {
   tab = "0";
   canKeyFocus = "0";
   mouseOverSelected = "0";
   modal = "1";
   opaque = "0";
   fillColor = "200 200 200 255";
   fillColorHL = "171 171 171 255";
   fillColorNA = "200 200 200 255";
   border = "0";
   borderThickness = "1";
   borderColor = "0 0 0 255";
   borderColorHL = "128 128 128 255";
   borderColorNA = "64 64 64 255";
   fontType = "Arial";
   fontSize = "14";
   fontColors[0] = "0 0 0 255";
   fontColors[1] = "128 128 128 255";
   fontColors[2] = "128 128 128 255";
   fontColors[3] = "200 200 200 255";
   fontColors[4] = "255 96 96 255";
   fontColors[5] = "0 0 255 255";
   fontColors[6] = "0 0 0 0";
   fontColors[7] = "0 0 0 0";
   fontColors[8] = "0 0 0 0";
   fontColors[9] = "0 0 0 0";
   fontColor = "0 0 0 255";
   fontColorHL = "128 128 128 255";
   fontColorNA = "128 128 128 255";
   fontColorSEL = "200 200 200 255";
   fontColorLink = "255 96 96 255";
   fontColorLinkHL = "0 0 255 255";
   doFontOutline = "0";
   fontOutlineColor = "255 255 255 255";
   justify = "left";
   textOffset = "0 0";
   autoSizeWidth = "1";
   autoSizeHeight = "1";
   returnTab = "0";
   numbersOnly = "0";
   cursorColor = "0 0 0 255";
   bitmap = "base/client/ui/BlockWindow";
};

(Dumped from GUITextListProfile)

In your new profile, change the fontColors[X] = "XXX XXX XXX XXX"; to whatever colours you need.

Then use \cX to access your use the colours when using addRow.
ex.
.addRow(0, "\c0Colour 0, \c1Colour1...");
« Last Edit: May 30, 2014, 09:10:35 AM by Fluff-is-back »

You can.

From some quick experimentation:

Create a new profile for the TextListCtrl


new GuiControlProfile(GuiTextListProfile) {
   tab = "0";
   canKeyFocus = "0";
   mouseOverSelected = "0";
   modal = "1";
   opaque = "0";
   fillColor = "200 200 200 255";
   fillColorHL = "171 171 171 255";
   fillColorNA = "200 200 200 255";
   border = "0";
   borderThickness = "1";
   borderColor = "0 0 0 255";
   borderColorHL = "128 128 128 255";
   borderColorNA = "64 64 64 255";
   fontType = "Arial";
   fontSize = "14";
   fontColors[0] = "0 0 0 255";
   fontColors[1] = "128 128 128 255";
   fontColors[2] = "128 128 128 255";
   fontColors[3] = "200 200 200 255";
   fontColors[4] = "255 96 96 255";
   fontColors[5] = "0 0 255 255";
   fontColors[6] = "0 0 0 0";
   fontColors[7] = "0 0 0 0";
   fontColors[8] = "0 0 0 0";
   fontColors[9] = "0 0 0 0";
   fontColor = "0 0 0 255";
   fontColorHL = "128 128 128 255";
   fontColorNA = "128 128 128 255";
   fontColorSEL = "200 200 200 255";
   fontColorLink = "255 96 96 255";
   fontColorLinkHL = "0 0 255 255";
   doFontOutline = "0";
   fontOutlineColor = "255 255 255 255";
   justify = "left";
   textOffset = "0 0";
   autoSizeWidth = "1";
   autoSizeHeight = "1";
   returnTab = "0";
   numbersOnly = "0";
   cursorColor = "0 0 0 255";
   bitmap = "base/client/ui/BlockWindow";
};

(Dumped from GUITextListProfile)

In your new profile, change the fontColors[X] = "XXX XXX XXX XXX"; to whatever colours you need.

Then use \cX to access your use the colours when using addRow.
ex.
.addRow(0, "\c0Colour 0, \c1Colour1...");
Thanks!

You can.

From some quick experimentation:

Create a new profile for the TextListCtrl


new GuiControlProfile(GuiTextListProfile) {
   tab = "0";
   canKeyFocus = "0";
   mouseOverSelected = "0";
   modal = "1";
   opaque = "0";
   fillColor = "200 200 200 255";
   fillColorHL = "171 171 171 255";
   fillColorNA = "200 200 200 255";
   border = "0";
   borderThickness = "1";
   borderColor = "0 0 0 255";
   borderColorHL = "128 128 128 255";
   borderColorNA = "64 64 64 255";
   fontType = "Arial";
   fontSize = "14";
   fontColors[0] = "0 0 0 255";
   fontColors[1] = "128 128 128 255";
   fontColors[2] = "128 128 128 255";
   fontColors[3] = "200 200 200 255";
   fontColors[4] = "255 96 96 255";
   fontColors[5] = "0 0 255 255";
   fontColors[6] = "0 0 0 0";
   fontColors[7] = "0 0 0 0";
   fontColors[8] = "0 0 0 0";
   fontColors[9] = "0 0 0 0";
   fontColor = "0 0 0 255";
   fontColorHL = "128 128 128 255";
   fontColorNA = "128 128 128 255";
   fontColorSEL = "200 200 200 255";
   fontColorLink = "255 96 96 255";
   fontColorLinkHL = "0 0 255 255";
   doFontOutline = "0";
   fontOutlineColor = "255 255 255 255";
   justify = "left";
   textOffset = "0 0";
   autoSizeWidth = "1";
   autoSizeHeight = "1";
   returnTab = "0";
   numbersOnly = "0";
   cursorColor = "0 0 0 255";
   bitmap = "base/client/ui/BlockWindow";
};

(Dumped from GUITextListProfile)

In your new profile, change the fontColors[X] = "XXX XXX XXX XXX"; to whatever colours you need.

Then use \cX to access your use the colours when using addRow.
ex.
.addRow(0, "\c0Colour 0, \c1Colour1...");
Cool beans! Never knew that.