Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Calendar
  New Posts New Posts RSS Feed - alignment in calendar item
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

alignment in calendar item

 Post Reply Post Reply
Author
Message Reverse Sort Order
olebed View Drop Down
Admin Group
Admin Group


Joined: 01 July 2014
Location: Ukraine
Status: Offline
Points: 841
Post Options Post Options   Thanks (0) Thanks(0)   Quote olebed Quote  Post ReplyReply Direct Link To This Post Topic: alignment in calendar item
    Posted: 21 February 2018 at 3:08pm
Hello,

I can advice to investigate using markup in Calendar Control.

See our VB sample
c:\Program Files (x86)\Codejock Software\ActiveX\Xtreme SuitePro ActiveX v18.3.0\Samples\Calendar\VB\CustomCalendar\frmMain.frm

methods mnuEnableMarkup_Click() and CalendarControl_GetItemText 
    ElseIf Params.Item = xtpCalendarItemText_EventMarkupTemplate Then
        If Params.ViewEvent.Event.CustomProperties.Property("xtpMarkupTemplate") = "" Then
            Params.Text = _
                    "<StackPanel Margin='5, 5, 5, 5' VerticalAlignment='Top' " & _
                    "HorizontalAlignment='Center'>" & _
                    "<TextBlock Padding='0,10,0,0' TextWrapping='Wrap'><Italic>Customized Subject:</Italic>  " & _
                    "/Calendar/Events/Event/Subject</TextBlock>" & _
                    "<TextBlock Padding='0,10,0,0'><Italic>Customized Body:</Italic>/Calendar/Events/Event/Body</TextBlock>" & _
                    "<TextBlock Padding='10,10,0,0'>" & _
                    "   - Codejock" & _
                    "</TextBlock>" & _
                    "</StackPanel>"
        End If


I see that no documentation for flag xtpCalendarItemText_EventMarkupTemplate. So in code sample above we set template for Markup. Then on drawing constants like "/Calendar/Events/Event/Subject" will be replaced with appropriate values from event. Full list of constants is
"/Calendar/Events/Event/Subject"
"/Calendar/Events/Event/Location"
"/Calendar/Events/Event/Body"   
"/Calendar/Events/Event/StartTime"
"/Calendar/Events/Event/EndTime"

Regards,
 Oleksandr Lebed
Back to Top
velddriel View Drop Down
Groupie
Groupie


Joined: 27 November 2010
Location: The Netherlands
Status: Offline
Points: 16
Post Options Post Options   Thanks (0) Thanks(0)   Quote velddriel Quote  Post ReplyReply Direct Link To This Post Posted: 20 February 2018 at 1:54pm
Or another (text)colour could also be a good option/alternative
Back to Top
velddriel View Drop Down
Groupie
Groupie


Joined: 27 November 2010
Location: The Netherlands
Status: Offline
Points: 16
Post Options Post Options   Thanks (0) Thanks(0)   Quote velddriel Quote  Post ReplyReply Direct Link To This Post Posted: 19 February 2018 at 12:36pm
Is it possible to add alignment to text on a calendar item.
I can show extra text by adding text to the subject, but I would like to give text extra attention by alligning it to the right.

Regards
Eric Ariens
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.141 seconds.