Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
4
Erster Beitrag:
vor 5 Jahren
Letzter Beitrag:
vor 5 Jahren
Beteiligte Autoren:
Stefan Bentvelsen, Arie

WD17 - position scheduler in weekmode on day 4

Startbeitrag von Arie am 09.04.2013 21:03

Hi,
I have a scheduler control in week mode.
By default it is displayed started at day 1 (monday)
The window is too small to display all days, but the user can use the scrollbar or mousewheel, to say day 4.
Now I want to do this programmatically. However SchedulerPosition or SchedulerPositionDateTime both jump to the correct week, but still display is started at day 1.
Did I miss an option or function to get hits done?
If not: is there some kind of smart trick to do this, i.e. sending mousewheel events or moving the scrollbar by code. Something like that?

Antworten:

Hi Arie,

Have you used a DateTime variable for SchedulerPositionDateTime() ?

I've used the following code for that, but it doesn't give you full control (on that moment, there was no SchedulerPositionDateTime() available) :


FOR i=1 TO 75
SendMessage(Handle(SCH_RITTEN),WM_HSCROLL,1,0)
END


von Stefan Bentvelsen - am 10.04.2013 08:00
SchedulerPositionDateTime() only sets the control on the period you need, but stil from the first day

But your SendMessage does the trick - thanks.

btw: I added SCH_Planning..DisplayEnabled = False/True to speed things up. Otherwise it scrolls every tick (75 times in you example), which is slow.

von Arie - am 10.04.2013 08:38
Hi Arie,

I have also used DisplayEnabled, but that was no part of the trick-code ;)

von Stefan Bentvelsen - am 10.04.2013 09:53
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.