Print Page | Close Window

alignment in calendar item

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=23578
Printed Date: 21 November 2024 at 10:22am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: alignment in calendar item
Posted By: velddriel
Subject: alignment in calendar item
Date 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



Replies:
Posted By: velddriel
Date Posted: 20 February 2018 at 1:54pm
Or another (text)colour could also be a good option/alternative


Posted By: olebed
Date 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



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