Under the TPlanner , i have the completion and competiondisplay property to see a progress bar in the item.
The color of this is always Red.
Is it possible to change this ?
thank for your help.
ps : i don't speak of the completion in the footer.
There are properties on Planner level to set this:
Planner.CompletionColor1: TColor
Planner.CompletionColor2: TColor
thank for your , it's good , but when i use the scrollbar of the planner , the completion color change on the planner .
see below , if is correct .
void __fastcall TMenuMain::Planner1ItemAfterPaint(TObject *Sender,
TPlannerItem *Item, TCanvas *ACanvas, TRect &ARect)
{
if (Item->Completion >= 100)
{
Planner1->CompletionColor1 = clYellow;
}
else
{
Planner1->CompletionColor1 = clRed;
}
Planner1->Update();
Planner1->Refresh();
----------------------------------------------------
Other question :
how can i show the holidays on the planner , i find this : BackGroundColor , but i don't know how to use and if is compatible with DBPlanner ?
I try the Item->Background and Item->AllowOverlap property , but it's not a good vision when i have two items in the same time. .
thyan k for your help.
Changing the Planner.CompletionColor from the OnItemAfterPaint won't work reliably.
I would suggest to do this from the OnItemText event handler.
You can use Planner.BackgroundColor[col,row]:TColor with Planner & DBPlanner
it sets the color of a cell at coordinates col,row in the Planner.
it sets the color of a cell at coordinates col,row in the Planner.
possible to have a sample for the Planner.BackgroundColor[col,row], please ?
in c++, just do this in code for example:
Planner->BackgroundColor[2][2] = clRed;