PDA

View Full Version : addRow&GuiTextListCtrl


projectigi
06-20-2006, 04:03 PM
Hi,

well I'm creating a GuiTextListCtrl in a GuiWindowCtrl
then im creating rows with

with(addRow(id,string)){
profile="GuiTextListEntryProfile";
useownprofile=true;
profile.fontcolor="255,0,0";
}

worked just fine now i only want some rows to be in color, i tried something like a switch

if(condition)
profile.fontcolor="0,255,0";
else
profile.fontcolor="255,0,0";

didnt work, it was green and then went red after a sec...
i tried adding 2 rows with addRow with different profile.fontcolors, seems like it always takes over the last set color for all rows, so how do i only color specific rows?

ApothiX
06-20-2006, 05:23 PM
I'm not sure if you can individually color rows, would be an interesting feature to add though.

Warcaptain
06-23-2006, 07:50 AM
Also the format is not "r,g,b" its "R G B" ie:

profile.fontcolor = "0 255 0";


that is the format for colors in GS2 GUI's... also I am not 100% sure but I know with GuiMLText you have to do somethign like <color:rrggbb> and everything after that is a certain color (cant do </color> btw)

ApothiX
06-23-2006, 09:23 AM
Also the format is not "r,g,b" its "R G B" ie:

profile.fontcolor = "0 255 0";


that is the format for colors in GS2 GUI's... also I am not 100% sure but I know with GuiMLText you have to do somethign like <color:rrggbb> and everything after that is a certain color (cant do </color> btw)
Both work. You can also do profile.fontcolor = { R, G, B }; if you wanted to.

Admins
06-23-2006, 12:00 PM
The text list entries don't have profiles. You can set the color of the selected row etc. via the GuiTextListCtrl profile

projectigi
06-23-2006, 02:16 PM
yeah but i dont want to set the color of the selected row
i want to e.g.
color row 1 red
color row 2 blue
color row 3 yellow
color row 4 purpel
...

ApothiX
06-24-2006, 08:40 AM
yeah but i dont want to set the color of the selected row
i want to e.g.
color row 1 red
color row 2 blue
color row 3 yellow
color row 4 purpel
...
If they don't have profiles, it's not possible to do that. Unless they are parsing HTML in their text, then you could use HTML tags to change the color.

projectigi
06-30-2006, 02:19 PM
bah i definitely hate it that we can't modify the gui objects..