Diese Seite mit anderen teilen ...

Informationen zum Thema:
WinDev Forum
Beiträge im Thema:
Erster Beitrag:
vor 2 Jahren, 1 Monat
Letzter Beitrag:
vor 2 Jahren
Beteiligte Autoren:
Arie, André Labuschagné, Stefan Bentvelsen, Allard, Steve Hodgman

WD21 - Scheduler Control

Startbeitrag von André Labuschagné am 19.06.2016 23:39

Hi All

I am filling a scheduler control programmatically. I want to refresh the control after an adding an appointment without reloading the entire schedule. SchedulerDisplay actually does this and is only effective if the control is attached to a data source. Is there any other way to display the scheduler control where an appointment has been added and there is no data source connected to the control.

By data source I mean file on the disk.

Seems rather silly that it does not refresh the control and there is no way to do so without reading the data off the disk again.



I load the Scheduler control from a Variable and SchedulerDisplay works fine after the variable has been updated.

The Variable is the instantiation of an object that contains a list (array) of classes. The properties of the contained class is linked to the items in the schedule. So when an appointment is added/editted/deleted I update the list object and then do a SchedulerDisplay.

If classes bother you I suspect you could also do it with an array of structures.

Steve H

von Steve Hodgman - am 20.06.2016 03:45
Hi Adre

Scedulardisplay does this but if you would like a scedular that needs to be filteres on different users etc this doesnot work.

In fact it only works if you use the basiscs and donot want anything special. Then it is really fast 5gl .Put control on screen . Connect and you are good to go.

If you need more then you need to programm it. Ok you are doing that so you are on the right path.
1Take a good look at the functions and what they really do.

2 Take a good look on how you have configured the control. If settings are not good . Some things donnot work by programming

Good news. It is all possible. You can make a full blow google like agenda if you want to. I did so in version ( a believe 18 ) in php modus. I made a sceduling app. Where users could book different nurses. The hours in the scedular where directly used to calculate pricing based on different hourly rates of the different nurces. All with the scedular control. And it was setup to be used as a saas so many users worked with the same page.

I donnot know If I can find the coding since I had to stop the project because funding was lost. But I will have a look.



von Allard - am 20.06.2016 08:46
Hi Steve and Allard

Pretty much given up. I cannot work out how to get the control to refresh. The Schedule control is on a tab and the entry of the data is on a second tab.


von André Labuschagné - am 21.06.2016 19:28

maybe I'm missing something but you say you use the schedule control by programming.
So you are already using SchedulerAddAppointment() ?
Which does exactly what you want, add one new item.

I do this in one of my apps and it works great.
When filling the first time with several items I also use Scheduler..DisplayEnabled = False/True to avoid flicker and speed things up.

von Arie - am 21.06.2016 19:49
Hi Arie

I am back and it is sorted. It turns out that you can push data straight into the scheduler control itself and do not to be linked to any variable or anything else. Very powerful and interesting. It seems to be working very well now.

Did not know about display enabled at all. Where do you use that? Do you disable until the data is loaded?


von André Labuschagné - am 21.06.2016 20:37
Hi Arie,

to stay with the scheduler control, do you know if it is possible to change the color or background color of the date/time captions (the columns) by code?
I want to highlight the selected date in the control ...

von Stefan Bentvelsen - am 21.06.2016 21:19
Yes André,

MyScheduler.DisplayEnabled = False
FOR EACH qry_Apointments
MyScheduler.DisplayEnabled = True

With a few items in the scheduler the difference will be small, otherwise you will be surprised.

von Arie - am 22.06.2016 06:28
Hi Stefan,
I have to disappoint you, I don't know if that is possible.
I always wondered why PCsoft does not expose ALL properties to the outside world. What can be so hard about that. These properties must be there to be able to get controls working in the first place. Even the devexpress controls for Delphi back in the old days could be far more customized.

von Arie - am 22.06.2016 06:55

also the use of an appointment variable will help.
If you have to set a number of properties and fields,
it makes a big difference in time when you use an appointment variable instead of updating the appointment for each field or property.

But I don't know if it speed up things in combination with ..DisplayEnabled.

von Stefan Bentvelsen - am 22.06.2016 11:30

As I said ealier. read through what the functions . Do. And Look at the control. If certain things are put down in the 7 tab modus then it doesnot work by code as well .

So if you disable something that need be used then it might not be possible.

1 Take a look at what the functions really do. Programming adding stuff is not that difficult. Understandig what the functions do might be confusing

2 Take a good look at the 7 tab window.


von Allard - am 24.06.2016 21:45
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.