calendar|控件|心得今天还继续在calendar控件里琢磨,看以下代码,(用来在calendar里显示日期标签):
       if d.isothermonth then
            c.controls.clear
        else
            dim strholiday,strformatstart,strformatend as string
            strholiday=holidays(d.date.month,d.date.day)
            strformatstart="
<font color=red>"
            strformatend="</font>"
            if strholiday<>"" then
                c.controls.add(new literalcontrol(strformatstart+strholiday+strformatend))
                c.forecolor=color.red
            end if
    end if
       c是一个tablecell对象,继承于dayrender事件的e参数。但对c.controls的作用不是很理解(偶会继续上网向大虾们请教)。D是一个calendarday对象,j继承于dayrender事件的e参数,对于d.IsOtherMonth的作用也不理解。
 
       解答及学习心得:d.isothermonty是指calendarday控件所指的日期是否不在calendar控件当前显示的月份中。取值为boolean型。这个属性是只读属性。
 
       关于dayrender事件的触发,我出了一个小小的问题,应该在calendar控件里就指明事件的发生(e.g:ondayrender=”calendar1_dayrender”)
 
       把问题基本解决以后,我已经掌握了calendar控件常用的使用方法,到此,对于calendar的学习告一段落。
calendar控件的学习心得
                    80酷酷网    80kuku.com 
       
  
 
 
  
