r/visualbasic • • Dec 30 '20

Is there a way to code an hourly time line similar to the attached picture. It will help me for a project I’m on at work but I’m struggling to find a way to do it?

Post image
12 Upvotes

7 comments sorted by

2

u/Salt-Slayer Dec 30 '20

Well the image I attached is an excel document, a company I used to work for used something similar, But I am keen to introduce it for my current role but not to sure how to code it?

2

u/TCBW Jan 11 '21 edited Jan 11 '21

What you have shown looks like a Gantt chart. Code Project had an example of this using GDI. It may point you in the right direction (Link Here).

Edit: Spelling

1

u/Salt-Slayer Jan 11 '21

Thank you ever so much for the link! That is near enough what i am looking for!

2

u/[deleted] Dec 30 '20

Is this web based? Like WebForms?

2

u/laancelot Dec 30 '20

Is this VBA or VB? If it's VB, what basis do you have, and where do you get the information to color and annotate the timeline?

2

u/breonb57 Jan 08 '21

This may be a bit of a long task but the way that I would do it would be to use panels in a table. You can then make another row above that and add your times in on labels. The colour of each panel can change depending on what is required

1

u/fasti-au Dec 31 '20

All the stuff up top are labels. The actual coloured lines is an array. Ignore the time stuff and think of each 15 minute block as a array item. Then overlay a label on top of the colours for the text with the sizes based on the array cell left and right boundaries