Forum > Packages and Libraries

Visual PlanIt Overlay mode

<< < (2/5) > >>

wp:
I added another way to tvplanit trunk how to create a resource group which is clearer and more flexible in my opinion: TVpResource.OverlayResources(AResources, ACaption). AResources is an array of the resource instances to be overlaid (not the resource ids any more!), and ACaption is an optional name for the resource group. When AResources is nil then resourcegroup assigned to the currently selected resource is removed. Unlike the old method, the resource to which the other resource are added must not be contained in AResources any more.


--- 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";}};} --- type TVpResource = class(...)   function OverlayResources(const AResources: TVpResourceArray;  ACaption: String = ''): TVpResourceGroup; 
This code is working in your second demo project correctly for me:

--- 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.CheckBox1Change(Sender: TObject);var  aParentRes: TVpResource;  aOverlaidRes: TvpResourceArray = nil;begin  aParentRes := VpSqlite3Datastore1.Resources.Items[0];  if CheckBox1.Checked then  begin    SetLength(aOverlaidRes, 2);    aOverlaidRes[0] := VpSqlite3Datastore1.Resources.Items[1];    aOverlaidRes[1] := VpSqlite3Datastore1.Resources.Items[2];    aParentRes.OverlayResources(aOverlaidRes);  end else    aParentRes.OverlayResources(nil);end;
I also extended the FullDemo project of the tvplanit installation by a possibility to select from a TCheckListbox the resources to be overlaid.

chrv:
I tested your demo on trunk.
Everything seems to word as expected.
I will try to test my app on this version

Many thanks

wp:
The wiki article about overlaid events (https://wiki.freepascal.org/Turbopower_Visual_PlanIt#Overlaying_events) has been updated to document the TVpResource.OverlayResources method.

And the flat-file datastores (xml, ini, json) have been extended to support resource groups as well.

chrv:
How is it possible to update Visual PlanIt from Online Package Manager. Is Visual PlanIt uptodate on OPM ?

Thank you ?

wp:
This new code is not yet available via OPM. You should either get the svn version from CCR, or download the zip-snapshot from https://sourceforge.net/p/lazarus-ccr/svn/HEAD/tree/components/tvplanit/.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version