Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Calendar
  New Posts New Posts RSS Feed - Mark Days at Runtine
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Mark Days at Runtine

 Post Reply Post Reply
Author
Message
dexatron View Drop Down
Newbie
Newbie
Avatar

Joined: 27 January 2010
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote dexatron Quote  Post ReplyReply Direct Link To This Post Topic: Mark Days at Runtine
    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
 
 
 
 
Back to Top
McKloony View Drop Down
Senior Member
Senior Member
Avatar

Joined: 09 January 2007
Location: Germany
Status: Offline
Points: 340
Post Options Post Options   Thanks (0) Thanks(0)   Quote McKloony Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
dexatron View Drop Down
Newbie
Newbie
Avatar

Joined: 27 January 2010
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote dexatron Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.156 seconds.