Forum > Packages and Libraries

Visual PlanIt Overlay mode

(1/5) > >>

chrv:
Hello everyone,

I'm trying to understand how "Overlay mode" works in Visual PlanIt.
I have read the wiki carefully but I cannot figure out how to activate this "Overlay mode".

In the attached zip, I made a prototype. Could someone modify this example so that "Overlay mode" can be activated.

Thank you

wp:
It looks as if grouping of resources has only be implemented for datastores based on databases, but not for datastores based on flat files.

Please give me some time to add this.

chrv:
In fact, i am interested in SQLite. I used XML as an example. I will check now with SQLinte.
Thank you.

wp:
SQLite3 should work, I tested it. The sample code in the wiki, however, is a bit imprecise because it uses constant ids for the resources to be merged, better to specify them as parameters:

--- 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 TMainForm.CreateResourceGroup(AResourceIDs: array of Integer; AGroupName: String = '');var  datastore: TVpCustomDatastore;  grp: TVpResourceGroup;begin  datastore := VpControlLink1.Datastore;  grp := datastore.Resources.AddResourceGroup(AResourceIDs, AGroupName);  grp.ReadOnly := true;  grp.Pattern := opDiagCross;  if datastore.Resource <> nil then    datastore.Resource.Group := grp   else    datastore.Resource.Group := nil;  datastore.RefreshEvents;  // or: datastore.UpdateGroupEvents;end;
So, when you want to overlay the second and third resources into the first resource shown in the resource combobox you should call it like this:

--- 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";}};} ---var  parentRes: Integer;  overlaidRes1: Integer;  overlaidRes2: Integer;...  parentRes := datastore.Resources.Items[0];  overlaidRes1 := datastore.Resources.Items[1];  overlaidRes2 := datastore.Resources.Items[2];  CreateResourceGroup([parentRes, overlaidRes1, overlaidRes2]);

chrv:
Thank you very much: it works
minor fix:
--- 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";}};} ---aParentRes: = VpSqlite3Datastore1.Resources.Items [0].ResourceID
Can I still ask:
- how do I "deoverlay" the view.

Thank you for helping me

Navigation

[0] Message Index

[#] Next page

Go to full version