Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Timetable view layout (Read 4842 times)
john6630
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 74
Joined: Sep 20th, 2010
Timetable view layout
Feb 5th, 2011 at 7:36pm
Print Post  
Hi Meppy,
First let me say that I think you have a fantastic product but the documentation is very very poor! It is a shame we have to learn to use it by trial and error.

Having said that, I have a simple timetable view on which I add appointments. I set it for 5 days/columns and each column has the date at the top and then a blank row extending across the 5 columns before the time cells begin. I would like to put a label in that area but do not see how to do it.

Also, is there a diagram like the one for items in the help file detailing which properties affect which areas of the layout. I am sure once I get used to using the component it will all be second nature but for now it is very frustrating.

Additional questions since my original posting...
I see that the area I am concerned about is the DayHeader? I do not see how to control the text in that area?

And is there a way to make the timetable view respond to the mouse wheel? To use the page up/down and/or arrow keys?


Thanks for your help,
John Lee
« Last Edit: Feb 7th, 2011 at 5:04am by john6630 »  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Timetable view layout
Reply #1 - Feb 7th, 2011 at 8:08am
Print Post  
Hi John,

Quote:
Having said that, I have a simple timetable view on which I add appointments. I set it for 5 days/columns and each column has the date at the top and then a blank row extending across the 5 columns before the time cells begin. I would like to put a label in that area but do not see how to do it.

This can be achieved only through custom-drawing. You have to set Calendar.CustomDraw to TimetableWholeDayHeader, to indicate that you are interested in drawing this particular section of the view. Then handle the Calendar.Draw event to perform the actual drawing - a string drawing in your case.

Quote:
Also, is there a diagram like the one for items in the help file detailing which properties affect which areas of the layout. I am sure once I get used to using the component it will all be second nature but for now it is very frustrating.

Unfortunately making a complete diagram will be difficult because of the large amount of properties affecting different aspects of the view appearance. Basically, the majority of the properties governing appearance are grouped in four styles in the TimetableSettings class: Style - for the view header and background, TimelineStyle - for the timeline to the left and CellStyle/WorkTimeCellStyle for the cells. Additional properties affecting the appearance can be found in the main TimetableSettings class, such as various sizing and formatting properties.

Quote:
And is there a way to make the timetable view respond to the mouse wheel? To use the page up/down and/or arrow keys?

The arrow keys and page up/down keys are assigned to moving the selection around the calendar. There is no built-in response to the mouse wheel, but you can easily handle the MouseWheel event on the Calendar class and perform the necessary scrolling by setting the Calendar.VScrollPos property.

Let me know if this helps.

Regards,
Meppy
  
Back to top
 
IP Logged
 
john6630
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 74
Joined: Sep 20th, 2010
Re: Timetable view layout
Reply #2 - Feb 7th, 2011 at 3:57pm
Print Post  
Hi Meppy,
Thank you for the quick response. Can you give me some sample code for the mouse wheel interaction?

I am also confused on the custom draw for the draw string. If you would be so kind as show me the way to do that also.

One more question while I am asking...how do I handle a work schedule to expands across midnight? For example 6AM today until 2AM tomorrow? I want to show the schedule on the production day starting at 6AM and going to 2AM the next day as one column in the timetable view.


Thanks,
John
« Last Edit: Feb 8th, 2011 at 3:35am by john6630 »  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Timetable view layout
Reply #3 - Feb 8th, 2011 at 7:28am
Print Post  
Here is a sample illustrating the features of interest:

https://mindfusion.eu/_samples/_sample_MouseWheelAndCustomDrawing.zip

I have done all the changes in code so that it is easier for you to follow them. You can set many of the properties in the designer property grid. In addition, I haven't tested if the mouse wheel code actually works but it should give you a hint how to do wheel handling and scroll the view in response to it.

Let me know if this helps.

Regards,
Meppy
  
Back to top
 
IP Logged
 
john6630
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 74
Joined: Sep 20th, 2010
Re: Timetable view layout
Reply #4 - Feb 8th, 2011 at 4:14pm
Print Post  
Hi Meppy,
Thank you for going to the trouble to make the sample for me. I will install it and try it out.

I also have a question about the timeline style. It seems to change when I set the StartTime and EndTime programmatically. I have screen shots but do not know how to add them to the post.

I do now know if I am trying to do something out of the ordinary, but in industrial planning situations, it is very common to have a "production" day overlap calendar days. It seems I can set the start and end times for time table to do this. But the work time start and end hours are limited to 0 - 24.

I would like to suggest a feature change to allow setting these as you do with the time table start end time. Also it is important to allow working across weekends. So those should be optional and allow including them in the work week.

Thanks,
John

PS Here is a representation of the time line style issue:

In design mode it looks like this

-----------
AM
-----
15
7 -----
30
-----
45
----------

and after I set it in my program it looks like

-------
7:00 AM
--------
7:15 AM
--------
7:30 AM
--------

etc.
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Timetable view layout
Reply #5 - Feb 9th, 2011 at 8:56am
Print Post  
A new (trial) version of the control can be downloaded from the following link:

https://mindfusion.eu/_pln_trial/MindFusion.Scheduling.5.1.2.zip

The version now enables the WorkTimeEndHour property of the TimetableSettings class to overlap across days. For example, in order to define a night shift 8 PM - 8 AM, you would do the following:

Code
Select All
calendar.TimetableSettings.WorkTimeStartHour = 20;
calendar.TimetableSettings.WorkTimeEndHour = 32; 


In addition work time can now be enabled for weekends by setting the new EnableWorkOnWeekends property of the TimetableSettings class to Enabled.

Regarding the issue you encountered it is most likely caused if TimetableSettings.StartTime or TimetableSettings.EndTime are not aligned to hours (that is, if they do not divide by 60). In this case grouping is automatically disabled.

Let me know if this helps.

Regards,
Meppy
  
Back to top
 
IP Logged
 
john6630
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 74
Joined: Sep 20th, 2010
Re: Timetable view layout
Reply #6 - Feb 9th, 2011 at 2:47pm
Print Post  
Thank you Meppy,
All of your answers helped me. Especially the sample code. The formatting was due to the start time not being whole hours.

I am sure I will need more help later, but again thank you!

John
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint