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
Variables as indexes of a...
by
JMarques
[March 31, 2023, 11:45:17 pm]
Save the same key ini fil...
by
BIT
[March 31, 2023, 11:45:04 pm]
Dark Theme in my program?
by
domasz
[March 31, 2023, 11:17:00 pm]
InterProcessCommunication...
by
KodeZwerg
[March 31, 2023, 11:11:59 pm]
How to access and set pro...
by
KodeZwerg
[March 31, 2023, 11:08:02 pm]
2.2.6 on Arch Linux
by
PeterBB
[March 31, 2023, 10:54:02 pm]
Programming for me 1977-1...
by
Blaazen
[March 31, 2023, 10:05:16 pm]
Question about IdMappedPo...
by
Remy Lebeau
[March 31, 2023, 10:00:53 pm]
Introducción al pascal mo...
by
BlueIcaro
[March 31, 2023, 09:08:18 pm]
SQL - looks easy but I ca...
by
af0815
[March 31, 2023, 08:57:11 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: [solve] tvPlanit - how to preselect a ressource? (Read 317 times)
Nicole
Hero Member
Posts: 744
[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: 10669
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: 744
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