im trying build a darkmode for my programm and now i have again a problem with the PlannerMonthView from TMS. You can change close to any color of the Month Planner but not the Item Color. Does anyone know how to change it to a diffrent Color like grey or something like that?
-
What do TMS support say about this? – MartynA Sep 23 '21 at 10:31
-
Taking a brief look at the docs, various items seem to have color properties, so please be more specific what class you ask about. – Tom Brunberg Sep 23 '21 at 10:57
-
Yes there are some color properties but not for the Background color of an item. I have create a Planner with Items like Notes. So and now im trying to change the color of the Planner to a little darker one like dark mode. Thats works perfectly except the Item background color. I cant change it from white to a other color like grey or something like that. – Daniel1999 Sep 23 '21 at 11:04
-
I repeat, what class do you ask about when you say "item". Or actually, maybe you should just turn to TMS. – Tom Brunberg Sep 23 '21 at 11:11
-
Sorry i dont know what class it is i think it is the item class from TPlannerMonthView but i mean with "Item" an item what you can create with PlannerMontView1.createitem so that shows an item in the Planner like in a calendar. So and my problem is that the background color of the Item is white and i want to change it. Sorry im new in delphi and i dont know that mutch. I can show it to you with a screenshot. https://prnt.sc/1tbukkg – Daniel1999 Sep 23 '21 at 11:21
-
Ok, I don't have the planner, so I can not test myself. But looking at the [doc](http://www.tmssoftware.biz/Download/Manuals/TMS%20TPLANNER.pdf) on page 8, most of the items have some color fill and looking further at page 11 onwards, `Background` is mentioned to set bg color, as well as `Color` and `ItemColor`. I hope you can take it from there, otherwise really ask TMS, they are known for providing good user support. – Tom Brunberg Sep 23 '21 at 11:49
-
Yeah i allready test the ItemColor from the normal Planner but it is not working with the PlannerMonthView component just with the normal Planner. But thanks for your help – Daniel1999 Sep 23 '21 at 11:54
-
In the referred doc on page 30 is a picture of an item editor that has settings for `background`, `selected background`. – Tom Brunberg Sep 23 '21 at 12:01
-
yeah i see but thats the TMS Planner component not the PlannerMonthView. With the normal Planner you can select a item background – Daniel1999 Sep 23 '21 at 12:09
2 Answers
Set then TPlannerMonthViewItems[n].color to desired color
with PlannerMonthView.CreateItem do
begin
id := 1;
Color := clGray;
CaptionBkg := Color;
shadow := true;
Text.Text := 'Test1';
ItemStartTime := StrToDate('21/09/2021');
ItemEndTime := StrToDate('21/09/2021');
end;

- 36
- 1
-
thanks for helping me out. From where do i get these information? but a little question i have. how i can change the item from/to color? now its like a color transition https://prnt.sc/1tc6izr – Daniel1999 Sep 23 '21 at 13:25
From TMS's TPlanner manual ** Additional properties that control the appearance of a TPlannerItem in the grid are:
Alignment: sets the alignment of text in the TPlannerItem
Attachement: string that can point to an attachement. If Attachement is a non-empty string, this is indicated by a clip in the TPlannerItem caption
Background: when true, the item is displayed without selectable border and cannot be moved or sized as such.
BorderColor: sets the color of the border of the TPlannerItem
BrushStyle: sets the background brush style of the TPlannerItem
CaptionAlign: sets the alignment of the TPlannerItem caption text
CaptionBkg: sets the background color of the TPlannerItem caption. This property has no effect when UniformBkg is true, as the TPlannerItem will always have a full uniform color
CaptionBkgTo: when different from clNone and UniformBkg is false, the caption is drawn with a gradient from CaptionBkg color to CaptionBkgTo color
CaptionBkgDirection: sets the caption background gradient direction
CaptionFont: sets the font for the TPlannerItem caption
CaptionText: sets the text for the caption. This text is only displayed when CaptinTupe is either ctText or ctTimeText
CaptionType: can be
- ctNone : no caption is displayed
- ctText : CaptionText is displayed
- ctTime : time of item is displayed
- ctTimeText : time and CaptionText are displayed at the same time
Color: sets the background color of the TPlannerItem
ColorTo: sets the gradient end color for the background of the TPlannerItem. When set to clNone, the background is drawn in a solid color.
ColorDirection: sets the item background gradient direction
Completion: sets the completion of the item. This is a value between 0 and 100.
CompletionDisplay: sets where to display the completion. The value can be : cdNone, cdVertical, cdHorizontal.
Cursor: sets the cursor that is used when mouse is over the item. If Cursor is -1, default cursors are used.
DrawTool: this assigns a component that encapsulates custom drawing for the TPlannerItem. If a drawtool component is assigned, this component will draw the item in the planner.
Editor: sets the instance of the editor component that will be used to edit the item.
EditMask: sets the edit mask that will be used when the inplace editor type is peEditMask.
Font: sets the font of the TPlannerItem
HintIndicator: When true, a small triangle is displayed in the top right corner of the item to indicate that a hint is available for the item. When HintIndicator is shown only when the Hint property is also a non-empty string.
HintIndicatorColor: Sets the color of the small triangle indicating a hint exists of the item.
ImageID: sets the index of the image from an attached imagelist to display in the TPlannerItem
ImagePosition: sets the position of the associated image(s) to display.
InHeader: when true, the item is displayed inside the TPlanner header
SelectColor: sets the color of the item when it is selected
SelectColorTo: sets the gradient end color of the item when it is selected
SelectFontColor: sets the font color of the item when it is selected
Shadow: when true, the TPlannerItem is displayed with a shadow. The shadow color is set with the property TPlanner.ShadowColor
Shape: sets the shape of the TPlannerItem to rectangle, hexagon, rounded rectangle or skinned. When skinned, the Planner Skin is used to draw the item.
ShowDeleteButton: when true, a delete button is displayed in the upper right corner of the planner item.
ShowLinks: when true, a chain icon is displayed to show the item is linked to another TPlannerItem
ShowSelection: when true, selected items are displayed with SelectColor and SelectFontColor
Text: the stringlist through which the TPlannerItem text is set
TrackBrushStyle: sets the brush to be used for painting the trackbar of the item
TrackColor: sets the color of the trackbar. The trackbar is the small colored bar with which the item can be dragged and moved inside the planner grid.
TrackSelectColor: sets the color of the trackbar when the item is selected
TrackLinkColor: sets the color of the trackbar when a linked item is selected.
TrackVisible: when true, the trackbar is visible on the TPlannerItem Unicode: when true, a Unicode caption and text is displayed for the TPlannerItem. The Unicode caption and text is set with WideCaption and WideText properties. Only used in non-Unicode Delphi versions!
UniformBkg: when true, CaptionBkg color has no effect
URL: string that can point to an URL. If URL is a non-empty string a link icon is displayed in the TPlannerItem caption
Visible: sets the visibility state of the TPlannerItem
WideCaption: sets the caption as Unicode (widestring) text. Set Unicode = true in order to see the Unicode text in the caption. Only used in non-Unicode Delphi versions!
WideText: sets the TPlannerItem text as Unicode. Only used in non-Unicode Delphi versions!
WordWrap: when true, TPlannerItem text is displayed with wordwrapping.
link to manual : https://download.tmssoftware.com/Download/Manuals/TMS%20TPLANNER.pdf

- 1
-
thanks for instructions / corrections to Blastfurnace, Mark Rotteveel, m4n0, CertainPerformance. (I'm new to stackoverflow) – jrg Sep 24 '21 at 14:45