Jump to content
Sign in to follow this  

Help with Weekly Student Timetable

Recommended Posts


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,


$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


Share this post

Link to post
Share on other sites

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:


Edited by Zedna

Share this post

Link to post
Share on other sites

Hi Zedna,

Thanks for the tip, Ill give it a go.


Share this post

Link to post
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
Sign in to follow this