TDBPlanner - TDBMonthSource

I have a strange problem. I use 8 modes for Planner. Except Week and those that have Resource. Once started, everything works as it should. Only when I start the application and in Month mode I only see the first day.
To set the properties of the Planner, I use the same / single code for all Planners and their modes. Other than in the Annex. In my opinion, this eliminates an error in the code.
I have no idea where the mistake may be.

Balloons do not work for TDBPlannerMonthView. Set January there first.Planner.zip (29.2 KB)

There are things between heaven and earth ... It's working today. I can't think of rebooting the OS.

I'm really angry. It doesn't work for just one month. January 2021. And only when running the form. I can't figure out the reason.
I checked the dates in the DB. OK.
Everything else goes like butter. In addition to bubbles for TDBPlannerMonthView.

The situation is unpleasant for me. I need to work it out.
I'm sorry to bother you.

It must have something to do with parenting of the PlannerMonthView.
I could make this work all the time with:

procedure TfrmPlannerRole.FormShow(Sender: TObject);
begin
  dbpmwMonth.Balloon.Enable := false;
  dbpmwMonth.Balloon.Enable := true;
end;

Okay, it worked.
It also works in FormCreate.

What about that one month? The submitted project shows it nicely.
Setting:
jstpnlProperyTop.ActivePateIndex = 0
advcbxViews.ActiveIndex = 3 (Mesiac)
Run the program. It's bad. Quit.
Setting:
advcbxViews.ActiveIndex = any other
Run the program. OK
In the advcbxViews, select Mesiac. OK
It's (probably) the last thing. As for the user interface.

What exactly means "it's bad" ?
How am I supposed to know what you see bad? I started this app with the active page set to 0 and I could not see anything "bad"

A single day is displayed. He's supposed to be there for a whole month!

  1. It is already showing a single day at design time and it shows a single day irrespective of starting with active page 0 or another activate page!
  2. there is no ItemSource connected to this TDBPlanner and the only place where I see this being assigned is in procedure TRolePlanner.SetActiveDay; When I put a breakpoint there , this code is never triggered.

Well thank you. I'll check it out.

I do not understand that. My code is completely redesigned.

no ItemSource is connected to this TDBPlanner.

I do it programmatically and it's definitely right.

Now I have dbmnsrMonth ItemSource connected to TDBPlanner in designtime.
Everything is going as it should

I would like to know the cause of such behavior. I can't figure it out. I'll leave it at that.

If you want to do runtime assignment, do the sequence

  • assign ItemSource
  • activate Dataset

That's how it works. But for others, I don't have to activate the DataSet until after the assignment. I Can do this before and let the DataSet live.
I close the topic. Well thank you.