Frequently Asked Component Specific Questions
Options |
Display all FAQ items |
Displaying items 1 to 1 of 1, page 1 of 1
<< previous next >>
TPlanner
Searching items in the planner
Searching items in the planner
This code fragment searches all items in the TPlanner for the word 'Meeting':
var plIt: TPlannerItem; begin plIt := nil; repeat plIt := Planner1.Items.FindText(plIt,'Meeting',[fnAutoGoto,fnText]); if Assigned(plIt) then ShowMessage('Found appointment'); until plIt = nil; ShowMessage('No more items found'); end;
Important note:
When making changes that affect a lot of items in the planner or when adding or removing a lot of items, performance will vastly improve when enclosing the operations with
TPlanner.Items.BeginUpdate; // do update, adding, removing of items here TPlanner.Items.EndUpdate;