Lazarus
Home
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Programming
»
Packages and Libraries
»
[solve] tvPlanit - how to preselect a ressource?
Free Pascal
Website
Downloads
Wiki
Documentation
Bugtracker
Mailing List
Lazarus
Website
Downloads (Laz+FPC)
Packages (OPM)
FAQ
Wiki
Documentation (RTL/FCL/LCL)
Bugtracker
CCR Bugs
IRC channel
GIT
Mailing List
Other languages
Foundation
Website
Useful Wiki Links
Project Roadmap
Getting the Source
Screenshots
How to use the forum
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
Search
Advanced search
Recent
possible fpc bug
by
jamie
[
Today
at 10:24:28 pm]
Frames - why the differen...
by
Warfley
[
Today
at 10:19:06 pm]
TChart: +32% Processor lo...
by
KatiYusha
[
Today
at 10:10:40 pm]
Timer
by
KodeZwerg
[
Today
at 09:59:55 pm]
maximum number of paramet...
by
Blaazen
[
Today
at 09:52:47 pm]
TGroupBox WMPaint ...
by
Espectr0
[
Today
at 09:52:37 pm]
MS C++ ThisCall
by
SonnyBoyXXl
[
Today
at 09:49:28 pm]
Converted from Delphi, fo...
by
wp
[
Today
at 07:24:05 pm]
Help with tsearchrec
by
Hartmut
[
Today
at 07:23:33 pm]
Runtime editing of report...
by
dbpacc
[
Today
at 07:13:05 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: [solve] tvPlanit - how to preselect a ressource? (Read 302 times)
Nicole
Hero Member
Posts: 728
[solve] tvPlanit - how to preselect a ressource?
«
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.
«
Last Edit: February 04, 2023, 05:29:07 pm by Nicole
»
Logged
wp
Hero Member
Posts: 10620
Re: tvPlanit - how to preselect a ressource?
«
Reply #1 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
;
Logged
Nicole
Hero Member
Posts: 728
Re: [solve] tvPlanit - how to preselect a ressource?
«
Reply #2 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.
Logged
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Programming
»
Packages and Libraries
»
[solve] tvPlanit - how to preselect a ressource?
TinyPortal
© 2005-2018