Forum > Packages and Libraries

[solve] tvPlanit - how to preselect a ressource?

(1/1)

Nicole:
In my tvPlanit calender are 2 ressources.
On form1.create I want to be selected the one, which is NOT.

I tried to change this by
TvPlanItFrame.VpResourceCombo1.ItemIndex:=1;

with no effect.

How to do it?
Thanks.

wp:
In all my test programs I have these lines to pre-select a given resource:


--- 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  if VpIniDatastore1.Resources.Count > 0 then    VpIniDatastore1.Resource := VpIniDatastore1.Resources.Items[0];end;

Nicole:
Thank you so much. This works.
And this without the vague bad feeling of my own solution, what would happen, if the datastore is empty.

Navigation

[0] Message Index

Go to full version