PDA

View Full Version : Calendar Control. Customize Icons



vmdiego
2-Sep-2009, 04:51 AM
Hello,
I am trying to customize the icons of an event of the calendar control, but I cannot find the solution.
Does anyone have some experience about how to do it?

Thanks in advance.

Victor M. Diego
A.T. MEDTRA, S.L.
Santander-Spain

Ian Smith
3-Sep-2009, 08:15 AM
Hi Victor

Need some more info as this gets complicated. Every icon on every view type (day / week, month) is controllable!

Are you using the SigCj class?

Do you want to change the standard icons or add additional custom icons?

vmdiego
14-Sep-2009, 07:44 AM
Hi Ian,

Sorry I have not been able to answer before, but I have been on holiday the last two weeks.

Yes, I am using Calendar SigCJ, with custom tables, and for me runs very well.
Now, I would like that each detail had it own icon. For example, in the standard mode, there are icons for meeting and/or private subjects, but I would like to have custom icons depending on the value of a field of my table.

Thanks,

Victor

Ian Smith
21-Sep-2009, 11:38 AM
Hi Victor

Sorry for the delay

This is not something that we have exposed. The calendar is schedule for a complete rewrite and custom icons will be supported in the new version, Until then you need to do two things

1. Modify Set_Theme_To_Office_07 of the Calendar class (caution there are two the other is in the Date Picker class). In this method you will see several Send ComLoadIcons... This is where you load the icons. You can do it here or better add a call to custom method in you object / sub class e.g.
Send Load_Custom_Icon hoCustomIcons

and then

Procedure Load_Custom_Icons handle hoCustomIcons
Send ComLoadIcons of hoCustomIcons sFullPath_To_Icon iIndex OLExtpImageNormal
End_Procedure

iIndex is a +ve integer to identify the icon.

2. When you load your events make sure that tEvent.sCustomIcons is set to a comma separated list of all the icon indexes for the icons that you want displayed

It should be that easy :)

vmdiego
22-Sep-2009, 06:49 AM
Thank you, I will try.

Regards,

Víctor