Demo学习: CalendarPanel
CalendarPane
学习CalendarPanel控件的常用事件。
DayClick(...) //点击日期块空白部分触发
EventClick(...) //点击日期块上事件触发
RangeSelect(...) //选择多个日期触发
procedure TMainForm.UniCalendarPanel1DayClick(Sender: TUniCalendarPanel;
ADate: TDateTime; Allday: Boolean);
begin
EventEditForm.Calenedar:=UniCalendarPanel1;
EventEditForm.ClearEvent;
EventEditForm.SetDate(ADate, ADate);
EventEditForm.ShowModal;
end; procedure TMainForm.UniCalendarPanel1EventClick(Sender: TUniCalendarPanel;
AEventId: Integer; AEvent: TUniCalendarEvent);
begin
EventEditForm.Calenedar:=UniCalendarPanel1;
EventEditForm.SetEvent(AEvent);
EventEditForm.ShowModal;
end; procedure TMainForm.UniCalendarPanel1RangeSelect(Sender: TUniCalendarPanel;
AStarDate, AEndDate: TDateTime);
begin
EventEditForm.Calenedar:=UniCalendarPanel1;
EventEditForm.ClearEvent;
EventEditForm.SetDate(AStarDate, AEndDate);
EventEditForm.ShowModal;
end;
procedure TMainForm.UniFormCreate(Sender: TObject);
var
E : TUniCalendarEvent;
begin
UniCalendar1.Date:=Date;
UniCalendarPanel1.StartDate:=Date; E:=UniCalendarPanel1.Events.Add; //添加日程
E.CalendarId:=; //日程id
E.Title:='Meeting'; //日程标题
E.StartDate:=Date; //开始时间
E.EndDate:=Date+0.1; //结束时间 E:=UniCalendarPanel1.Events.Add;
E.CalendarId:=;
E.Title:='Meeting-2';
E.StartDate:=Date+;
E.EndDate:=Date+1.1;
E.IsAllDay:=True; E:=UniCalendarPanel1.Events.Add;
E.CalendarId:=;
E.Title:='Meeting-3';
E.StartDate:=Date+1.1;
E.EndDate:=Date+1.2; E:=UniCalendarPanel1.Events.Add;
E.CalendarId:=;
E.Title:='Meeting-4';
E.StartDate:=Date+2.1;
E.EndDate:=Date+2.2;
E.Reminder:='In 15 Minutes';
end;
在项目上用到了日历控件,主要用来显示签到签退记录。
...
with UniMainModule.qryDetail do
begin
First;
while not eof do
begin
...
if FieldByName('缺勤数').AsInteger = then
begin
E := UniCalendarPanel1.Events.Add;
E.Title := '出勤';
E.StartDate := nStart;
E.EndDate := nStart;
E.IsAllDay:=True;
end;
Inc(nid);
next;
end;
First;
end;

Demo学习: CalendarPanel的更多相关文章
- 《IT蓝豹》吹雪花demo,学习android传感器
吹雪花demo,学习android传感器 吹雪花demo,学习android传感器,嘴巴对着手机底部吹一下就会出现飘着雪花效果. 算是学习android传感器效果.本例子主要是通过android.me ...
- [Unity3D]做个小Demo学习Input.touches
[Unity3D]做个小Demo学习Input.touches 学不如做,下面用一个简单的Demo展示的Input.touches各项字段,有图有真相. 本项目已发布到Github,地址在(https ...
- 百度mobile UI组件GMU demo学习1-结构和初始化
移动web现在已经是zepto的天下,但是一直找不到合适UI库,找了一段时间,终于找到了百度的ui库gum和inter 的 appframework UI库 相比之下,百度的UI库更接地气,配合百度强 ...
- ShadowGun Demo学习(非技术向)
主要针对拿来主义,并对一些使用范围广的shader进行研究.虽然是4,5年前的demo,但还是有学习价值的 1.GodRays MADFINGER/Transparent/GodRays 传统的上帝之 ...
- 微信小程序官方demo学习
最近微信小程序很火,很喜欢那种轻应用,用完就走的理念.于是,下载好微信开发者工具,学习一下官方demo. 体验下来,有类似react和vue的感觉,dom类似react那种组件的,data-bindi ...
- Cesium学习笔记(七):Demo学习(自由控制飞行的飞机)[转]
https://blog.csdn.net/umgsoil/article/details/74923013# 这是官方的教程Demo,名字叫Use HeadingPitchRoll,顾名思义,就是教 ...
- 如何写好demo——学习感悟
文章标题:教你如何写好Demo应用 如何制作出最有用的demo呢? 简,易 在demo中,我们要专注于单一的主题.我们的教学覆盖了很大的知识范围,因此,化整为零是非常必要的. 例如,我们要说明Andr ...
- unity3d入门 Demo 学习记录
闲来学习一下 unity3d 的Demo,记录如下. 官方 Demo,名字为 Roll-A-Ball,如图 场景比较简单,包含地面.玩家精灵.主摄像机.墙壁.可拾取的方块.分数为示 text.平行光源 ...
- BNR Android Demo学习笔记(一)——CrimeIntent
开发环境:win7,Android Studio 1.2, 1.Model Crime,数据模型,每个Crime有一个UUID作为唯一标识. package tina.criminalintent; ...
随机推荐
- SAP-SD-ABAP-VMOD 查找和应用SD模块用户出口(user exit) 好方法 .
针对 SD 模块,有一个专门管理 user-exit 的开发包 VMOD , 只要用tcode: se80 查看它, 会发现绝大部分的 SD 要相关的 user-exit 都能在这找到.
- webService 讲解
Web Service简介: Web Service 是构建互联网分布式系统的基本部件,可以将具有特定功能或者可复用应用程序封装. 技术组成要素: SOAP:Web Service的基本通信协议,由普 ...
- C#_MVC_ajax for form
在上一篇介绍MVC中的Ajax实现方法的时候,曾经提到了除了使用Ajax HTML Helper方式来实现之外,Jquery也是实现Ajax的另外一种方案. 通过get方法实现AJax请求 View ...
- OAuth 2 Developers Guide--reference
Introduction This is the user guide for the support for OAuth 2.0. For OAuth 1.0, everything is diff ...
- sleep() wait() yield() join()用法与区别
1.sleep()方法 在指定时间内让当前正在执行的线程暂停执行,但不会释放“锁标志”.不推荐使用. sleep()使当前线程进入阻塞状态,在指定时间内不会执行. 2.wait()方法 在其他线程调用 ...
- Java基础知识强化之多线程笔记05:Java程序运行原理 和 JVM的启动是多线程的吗
1. Java程序运行原理: Java 命令会启动Java 虚拟机,启动 JVM,等于启动了一个应用程序,也就是启动了一个进程.该进程会自动启动一个 “主线程” ,然后主线程去调用某个类的 m ...
- C++的三大特性之一继承
一.继承的相关基本概念 1.继承的定义 在C++中,可以使用继承来使新类得到已定义的一些类中的特性,这就好比与孩子从父亲母亲得到遗传类似,所以我们称原有的类为基类或父类,用原有类来生成新的类的 ...
- hadoop安装包的目录结构
初次接触Hadoop,了解了Hadoop安装包的目录结构,和大家分享下: bin:Hadoop最基本的管理脚本和使用脚本的目录,这些脚本是sbin目录下管理脚本的基础实现,用户可以直接使用这些脚本管理 ...
- Java队列实现
队列数组实现:队列长度有限,但是考虑到平时一般都使用有界队列,这应该也不算是个缺点 public class Queue { private Object[] objs; private int he ...
- [原] Unity下的ElectroServer的连接
ES的版本是5.4.1,示例目录下code_examples\ConnectAndLoginManually是Unity的连接和登录代码. 除了host和port需要指定,在连接时需要指定连接方式,如 ...