Jump to content

list view font color


hezi
 Share

Recommended Posts

Hey ALL,

i need your help with GUI controls. (my first real GUI script.... sorry if i missed something)

i created list view in my GUI and it work perfect for me.

the only issue that i have is when i try to color the text,

my goal is creating list with the results of the operations user made. if it fail the line will show in red for example.

the list show all the operation made, if one operation success it will show in green and the next operation will show red and so on.

when i change the color in control it colors the all text. I want create different lines with different colors.

maybe my mistake is using this kind of control and if you think it better use other control i will be glade to take your recommendations.

$List1 = GUICtrlCreateList("", 8, 56, 769, 578)

func Update_List_view($list,$text,$color)
    ;0xff0000 -red
    ;0x008000 - green
    ;0x000000 - black
    _GUICtrlListBox_BeginUpdate($list)
    GUICtrlSetColor($list, $color)
    _GUICtrlListBox_AddString($list,$text )
    _GUICtrlListBox_UpdateHScroll($list)
    _GUICtrlListBox_End`($list)

    ;GUICtrlSetData($List,$text,0)
    
EndFunc
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...