Lazarus
Programming => Packages and Libraries => Topic started by: Nicole on February 04, 2023, 10:40:58 am
Title:
[solve] tvPlanit - how to preselect a ressource?
Post by:
Nicole
on
February 04, 2023, 10:40:58 am
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.
Title:
Re: tvPlanit - how to preselect a ressource?
Post by:
wp
on
February 04, 2023, 11:54:40 am
In all my test programs I have these lines to pre-select a given resource:
Code: Pascal
[Select]
[+]
[-]
procedure
TForm1
.
FormCreate
(
Sender
:
TObject
)
;
begin
if
VpIniDatastore1
.
Resources
.
Count
>
0
then
VpIniDatastore1
.
Resource
:
=
VpIniDatastore1
.
Resources
.
Items
[
0
]
;
end
;
Title:
Re: [solve] tvPlanit - how to preselect a ressource?
Post by:
Nicole
on
February 04, 2023, 05:31:04 pm
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.
TinyPortal
© 2005-2018