Forum > Packages and Libraries

Visual PlanIt Overlay mode

<< < (5/5)

Solved ...
Overlay mode works as expected.

It was clearly a problem of version. Sorry for troubles and time lost ...

No need to be sorry. It was interesting to revisit the code which I had ported several years ago.

Hello everyone,

After several improvements, I arrive to a new problem.

As you can see in the attachment, when I try to use a TVpResourceCombo to drive a TVpDayView, I cannot display the item on the combo (see Form1, secondary form).
I can see the items in the list by dropping down it (2.png).
No problem to youse a TVpResourceCombo on the same form as the TVpDayView (See on the right of main form).

A short demo is attached.

Has anyone a solution ?

The second form is created after the main form. When you have the resource combobox on a second form, but all the other PlanIt stuff on the main form, the combo does not get notified that the datastore is set up because it does not yet exist.

Clear the Datastore property of the combobox on the second form. Then add the following code to the OnCreate handler of  this form:

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---procedure TForm1.FormCreate(Sender: TObject);begin  VpResourceCombo1.DataStore := MainForm.VpControlLink.DataStore;;  MainForm.ResourceChangeHandler(nil,MainForm.VpControlLink.Datastore.Resource);end;When now the DataStore of the combo is set the combo reads all the required information and sets the selected item index.

Having to call a method of the main form here, kind of hurts me... I think I should spend some time to fully integrate the checkedlist box into the TVPlaint infrastructure...

It works fine.

Thank you very much


[0] Message Index

[*] Previous page

Go to full version