Muzza Posted April 4, 2008 Share Posted April 4, 2008 I am developing an app to manage music students and teachers. I have a simple list view showing a weekly timetable for a teacher (see screenshot). Can anyone give me any ideas (code would be even greater) to make this look better. My ideal would be to show the length of each lesson and colour coding by location or type of lesson. Thanks heaps, Muzza $g_ListClose = GUICtrlCreateButton("Close", $g_Main_W - 50, $g_DataHight + 20) $g_ListGroup = GUICtrlCreateGroup ( "Jenny's Timetable", 165, 5 , $g_DataWidth, $g_DataHight + 15) $g_List = _GUICtrlListView_Create ($g_Main, "", 170, 20 , $g_DataWidth - 10, $g_DataHight - 5,BitOR($LVS_EDITLABELS, $LVS_REPORT), $WS_EX_CLIENTEDGE) _GUICtrlListView_InsertColumn ($g_List, 0, "Time", 40 ) _GUICtrlListView_InsertColumn ($g_List, 1, "Monday", 110 ) _GUICtrlListView_InsertColumn ($g_List, 2, "Tuesday", 110 ) _GUICtrlListView_InsertColumn ($g_List, 3, "Wednesday", 110 ) _GUICtrlListView_InsertColumn ($g_List, 4, "Thursday", 110 ) _GUICtrlListView_InsertColumn ($g_List, 5, "Friday", 110 ) _GUICtrlListView_InsertColumn ($g_List, 6, "Saturday", 20 ) _GUICtrlListView_InsertColumn ($g_List, 7, "Sunday", 20 ) _GUICtrlListView_SetItemCount ($g_List, UBound($a_TutTimeT)) _GUICtrlListView_AddArray ($g_List, $a_TutTimeT) GUICtrlCreateGroup ("",-99,-99,1,1) ;close group Link to comment Share on other sites More sharing options...
Zedna Posted April 4, 2008 Share Posted April 4, 2008 (edited) You can change text/background color for whole listview control by:GUICtrlSendMsg($ListView, $LVM_SETTEXTCOLOR, 0, 0xffffff) GUICtrlSendMsg($ListView, $LVM_SETTEXTBKCOLOR, 0, 0x000000)For different color/background color of each item you must use LVS_OWNERDRAWFIXED listview style and draw each item yourself.Look here at similar OWNERDRAW approach with Listbox: Link Edited April 4, 2008 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Muzza Posted April 8, 2008 Author Share Posted April 8, 2008 Hi Zedna, Thanks for the tip, Ill give it a go. Muzza 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