RS200Z Posted March 6, 2007 Share Posted March 6, 2007 Can someone explain to me how to use the special flag $GUI_BKCOLOR_LV_ALTERNATE as mentioned in the help file to create a ListView with different colors for odd and even rows. I can't seem to find any example script of it. Link to comment Share on other sites More sharing options...
ChrisL Posted March 6, 2007 Share Posted March 6, 2007 (edited) #include <GUIConstants.au3> #include <GuiListView.au3> Local $array[10] $Form1 = GUICreate("AForm1", 370, 270, 193, 115) $ListView = GUICtrlCreateListView("First Column|Second Column|Third Column", 10, 10, 350, 250) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_LV_ALTERNATE) For $i = 1 to Ubound($array) -1 $array[$i] = GUICtrlCreateListViewItem("stuff|stuff|stuff", $ListView) GUICtrlSetBkColor(-1,0xFF00FF) Next GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Incidently if you try using it with this method to create the listview entries _GUICtrlListViewInsertItem($ListView,-1,"stuff|stuff|stuff") it doesn't work. Using the first method I think your limited to 4000 rows Edited March 6, 2007 by ChrisL [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire Link to comment Share on other sites More sharing options...
FreeRider Posted March 22, 2007 Share Posted March 22, 2007 Hi RS200Z, Hope this will help (It should... It also took time for me to understand the help file guidance regarding this subject). GUICtrlCreateListView(.....) <==== create your list view control GUICtrlSetBkColor(-1, Put here the Hexa code for the Control Color) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_LV_ALTERNATE) GUICtrlCreateListViewItem(....)<==== create your list view items GUICtrlSetBkColor(-1, Put here the Hexa code for the listview item Color) GuiSetState() FreeRiderHonour & Fidelity 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