FNCPlanner - How to style the buildin editor

In FNC_Dark style the buildin editor of FNCPlanner has white buttons with white fontcolor. The buttons still working, but user can't see the buttons.
It looks like that:

  1. How to style fontcolor and buttoncolor in buildin-editor?
  2. How to style backgroundcolor of the pagecontrol buildin-editor?
  3. How to style the buttom panel containing the buttons for remove, add and cancel?
  4. how to translate caption of labels and buttons in buildin-editor?

When buildin-editor is opened, the inactive time color changes from dark brown to white. When the build in editor is closed, color of inactive time is changed back to dark brown. How to stop this behavior? In following screenshot you see the normal color before doubleclick on the item and after editor is closed:

As with the grid, please set AdaptToStyle programmatically to True, in the constructor of the form of you are using VCL or FMX styles. if you are using FNC styling, set the style name programmatically in the same way. Please note that you cannot combine AdaptToStyle and FNC style manager styling. To customize the panel, you can access properties by using TMSFNCPlanner1.GetEditingDialog.

TMSFNCPlanner1.GetEditingDialog works and is the solution! Thank you for your help.

Meanwhile i was experimenting with the custom dialog of FNCPlanner and followed the approach from the TMS documentation:

I created a emtpy VCL-Application, dropped a FNCPlanner on the form, changed MouseInsertmode to pmimDialogAfterSelection and wrote following code:

type
  TForm4 = class(TForm)
    TMSFNCPlanner1: TTMSFNCPlanner;
    procedure FormCreate(Sender: TObject);
  private
    { Private-Deklarationen }
  public
    { Public-Deklarationen }
  end;

  TForm1 = class(TTMSFNCPlannerCustomItemEditorForm)
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
    procedure Initialize; override;
  end;

var
  Form4: TForm4;

implementation

{$R *.dfm}

Procedure TForm1.FormCreate(Sender: TObject);
Begin
  //
End;

Procedure TForm1.Initialize;
Begin
  //
End;

procedure TForm4.FormCreate(Sender: TObject);
Var Editor : TTMSFNCPlannerEditingDialog;
begin
  TMSFNCPlanner1.InitSample;
  // Custom Editor Dialog
  TMSFNCPlanner1.CustomItemEditorForm := TForm1;

  // Code from Pieter. It works!
  //Editor := TMSFNCPlanner1.GetEditingDialog;
  //Editor.ButtonOK.Caption := 'Hallo';
end;

end.

When i invoke the editor i get following error message. Can you please give some advance what is missing in the code above? Thanks for your help.

Here is a sample on how to integrate this.

Hi Pieter,
your solution with TTMSFNCPlannerEditingDialog does work only for panels and buttons.

Here is the code:

 // Code from Pieter. It works!
  Editor := Planner.GetEditingDialog;
  Editor.ButtonOK.Caption := 'Speichern';
  Editor.ButtonOK.Font.Color := clWhite;
  Editor.ButtonOK.Font.Style := [];
  Editor.ButtonRemove.Caption := 'Löschen';
  Editor.ButtonRemove.Font.Style := [];
  Editor.ButtonRemove.Font.Color := clWhite;
  Editor.ButtonCancel.Caption := 'Abbrechen';
  Editor.ButtonCancel.Font.Color := clWhite;
  Editor.ButtonCancel.Font.Style := [];
  Editor.Background.Color := clGray;
  Editor.Panel.Color := clGray;
  Editor.BottomPanel.Color := clGray;

  // Does not work!
  Editor.FullDayCheckBox.Caption := 'Ganztägig';
  Editor.ResourcesComboBox.Text := 'Mitarbeiter';
  Editor.StartTimeLabel.Caption := 'Startzeitpunkt';
  Editor.EndTimeLabel.Caption := 'Endezeitpunkt';
  Editor.TitleLabel.Caption := 'Betreff';
  Editor.TextLabel.Caption := 'Bemerkungen';

And the screenshot:

Did i make a mistake in my sourcecode? It compiles. I can style and translate the buttons and panels. The Labels are not styleable. What about the Tabs? The tabs are eben without a property in TTMSFNCPlannerEditingDialog. How to style and translate them?

I see you are using the recurrency editor, it's available via

TMSFNCPlannerItemEditorRecurrency1.CustomContentPanel

Perfect, and thank you for your lightning fast response.

Just for information. The color of the buttonpanel in the editor does change the color in the inactive area of the planner when the editor is active. When you choose red for the Buttompanel the inactive area gets this color. When you compare my screenshots from the beginning you see the white color of the buttompanel and the white color of the inactive area are the same (white). I only changed the color in the editor in clgray and when the editor is active the inactivearea color changes also to clgray. For me its ok, it changes in my case from cldargrey to clgrey, maybe for others you have a look at that issue.

Hi Pieter,
you sent me an example for using a custom Editor Form. In FNCPlanner documentation i found following info:

The properties that can be accessed from documentation are

PlannerMode: TTMSFNCPlannerEditingMode;
PlannerItem: TTMSFNCPlannerItem; (read only)
Planner: TTMSFNCCustomPlanner; (read only)
PlannerEndTime: TDateTime;
PlannerStartTime: TDateTime;
PlannerResource: Integer;
PlannerTitle: string;
PlannerText: string;
PlannerFullDay: Boolean;

I added your examplecode with this code like this:

{ TForm30 }

procedure TForm30.Initialize;
begin
  // Code from Pieter Unit30.pas
  inherited;
  Memo1.Lines.Add(PlannerText);
  Memo1.Lines.Add(PlannerTitle);
  // I added following code from documentation FNCPlanner Custom Editor
  // does not work: Accessviolation because PlannerItem is Nil!
  memo1.Lines.Add(FormatDateTime('d mmmm, yyyy', PlannerItem.StartTime));
  memo1.Lines.Add(FormatDateTime('d mmmm, yyyy', PlannerItem.EndTime));
end;

Is this as expected that PlannerItem is nil? Is there any other way to access the active item by
using a property from planner? I did not found a property like planner.activeitem or somethink else to access the active item through the planner.items[ActiveItem] object.

My goal is to extend the basic database fields from FNCPlanner with records from the underlaying system like saving the Colors, Links to documents, using and changing customerrecord, Userrecord. For this i need access to the item object.

The PlannerItem is nil, because you start from an empty slot. If you select an existing item, and edit that item, the PlannerItem will be assigned. This way, you can add new items and update existing items.