SasiKumarN Posted February 21, 2013 Share Posted February 21, 2013 Hi all, Is there a way to set different back color on _GUICtrlListView_SetTextBkColor in a list view?? I am planning to change the color based on the Data in the List view. Here for example if I need to mark Item 9 as RED and Item 6 as Green in Text back color, then please help me if possile. Thanks, Sasikumar Nithyanandam expandcollapse popup#include #include #include $Debug_LV = False ; Check ClassName being passed to ListView functions, set to True and use a handle to another control to see it work _Main() Func _Main() Local $hListView GUICreate("ListView Set Text BkColor", 400, 300) $hListView = GUICtrlCreateListView("", 2, 2, 394, 268) GUISetState() ; Set colors _GUICtrlListView_SetBkColor($hListView, $CLR_MONEYGREEN) _GUICtrlListView_SetTextColor($hListView, $CLR_BLACK) _GUICtrlListView_SetTextBkColor($hListView, $CLR_MONEYGREEN) ; Add columns _GUICtrlListView_AddColumn($hListView, "Items", 100) ; Add items _GUICtrlListView_BeginUpdate($hListView) For $iI = 1 To 10 _GUICtrlListView_AddItem($hListView, "Item " & $iI) Next _GUICtrlListView_EndUpdate($hListView) ; Show clors MsgBox(4160, "Information", "Back Color ....: " & _GUICtrlListView_GetBkColor($hListView) & @CRLF & _ "Text Color ....: " & _GUICtrlListView_GetTextColor($hListView) & @CRLF & _ "Text Back Color: " & _GUICtrlListView_GetTextBkColor($hListView)) ; Loop until user exits Do Until GUIGetMsg() = $GUI_EVENT_CLOSE GUIDelete() EndFunc ;==>_Main Link to comment Share on other sites More sharing options...
SasiKumarN Posted February 21, 2013 Author Share Posted February 21, 2013 Actually I am trying to set the color dynamically based on the Data which is getting uploaded as per Row wise. Let me know if this is possible by any other means as well. Thank you... Link to comment Share on other sites More sharing options...
kylomas Posted February 21, 2013 Share Posted February 21, 2013 A search would have revealed thread.kylomas Forum Rules Procedure for posting code "I like pigs. Dogs look up to us. Cats look down on us. Pigs treat us as equals." - Sir Winston Churchill Link to comment Share on other sites More sharing options...
SasiKumarN Posted February 25, 2013 Author Share Posted February 25, 2013 Thank you very much Kylomas. although i am not a advanced users like you all, this might help me. I am reading through the link and trying to incorporate it in my script. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now