使用Berlin Update 2的TCalendarView, TCalendarPicker和Livebindings

Posted by on in Blogs

Berlin Update 2的新功能之一就是提供了2個新的VCL元件:

TCalendarViewTCalendarPicker

 這2個元件可以讓開發人員藉由它們的Date特性值來處理日期資料:

 

不過這2個元件也仍然可以藉由Livebindings和資料庫中的位資料繫結,開發人員可以右擊滑選擇Bind Visually:

 

Live Bindings中再點選元件下方的”…”啟動Bindable Memebers對話盒, 再於其中選擇要繫結Date特性:

 

最後再拖資料庫的日期位到此2個元件的Date特性即可. 例如下圖就是筆者在TCalendarViewTCalendarPicker人件中繫結和顯示MS SQL Server 2012Northwind資料庫Employees資料表的BirthDate位資料:

 TCalendarViewTCalendarPicker元件可以結合程式碼或是Live Bindings技術處理資料, 仍然保持和其他VCL元件一樣的直覺和好用的特性.



Comments

Check out more tips and tricks in this development video: