Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   New Scripting Engine (GS2) (https://forums.graalonline.com/forums/forumdisplay.php?f=153)
-   -   addRow&GuiTextListCtrl (https://forums.graalonline.com/forums/showthread.php?t=66778)

projectigi 06-20-2006 03:03 PM

addRow&GuiTextListCtrl
 
Hi,

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

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
NPC Code:

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 04:23 PM

I'm not sure if you can individually color rows, would be an interesting feature to add though.

Warcaptain 06-23-2006 06:50 AM

Also the format is not "r,g,b" its "R G B" ie:
NPC Code:

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 08:23 AM

Quote:

Originally Posted by Warcaptain
Also the format is not "r,g,b" its "R G B" ie:
NPC Code:

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 11:00 AM

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 01: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 07:40 AM

Quote:

Originally Posted by projectigi
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 01:19 PM

bah i definitely hate it that we can't modify the gui objects..


All times are GMT +2. The time now is 05:44 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.