Print Page | Close Window

Mark Days at Runtine

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Calendar
Forum Description: Topics Related to Codejock Calendar
URL: http://forum.codejock.com/forum_posts.asp?TID=17589
Printed Date: 08 July 2024 at 1:46pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Mark Days at Runtine
Posted By: dexatron
Subject: Mark Days at Runtine
Date Posted: 23 November 2010 at 9:27am
Hi,
 
In the month view I am trying to figure out how to mark days with a different background color when a user right-clicks on a day and selects 'Mark or Unmark Day'
 
I've set BeforeDrawThemeObjectFlags to true
 
but am not sure if BeforeDrawDayViewCell is the place to put the code and even how to properly capture the current day.
 
Any help appreciated, Greg
 
 
 
 



Replies:
Posted By: McKloony
Date Posted: 24 November 2010 at 2:33am

 

First you have to selekt the evebt, then you can do what you want with this event:

 


Private Sub calCont1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)

Dim TerNr As Long
Dim CaEvt As XtremeCalendarControl.CalendarEvent
Dim CaEvs As XtremeCalendarControl.CalendarEvents
Dim CaHit As XtremeCalendarControl.CalendarHitTestInfo
Dim ViEvt As XtremeCalendarControl.CalendarViewEvent
Dim ViEvs As XtremeCalendarControl.CalendarViewEvents

If Button = vbRightButton Then


Set ViEvs = CaCol.ActiveView.GetSelectedEvents
For Each ViEvt In ViEvs
    If ViEvt.Selected = True Then
        ViEvt.Selected = False
    End If
Next ViEvt

Set CaHit = CaCol.ActiveView.HitTest
If Not CaHit.HitCode = xtpCalendarHitTestDayViewTimeScale Then
    If Not CaHit.HitCode = xtpCalendarHitTestUnknown Then
        If Not CaHit.ViewEvent Is Nothing Then
            TerNr = CaHit.ViewEvent.Event.id
        Else
            TerNr = 0
        End If
    Else
        TerNr = 0
    End If
Else
    TerNr = 0
End If

If TerNr > 0 Then
    CaHit.ViewEvent.Selected = True
    CaCol.Populate
End If


End If

End Sub



-------------
Product: Xtreme SuitePro (ActiveX) 16.2.5

Platform: XP / Windows 7

Language: Visual Basic 6.0 SP6


Posted By: dexatron
Date Posted: 25 November 2010 at 8:41am

Thanks for the reply McKloony,

 
But I am trying to mark the background color of a selected day, not an event.
 

Greg



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net