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
OpenSSL 3.0 vs Indy's 1.0...
by
PizzaProgram
[
Today
at 09:45:33 pm]
Make build crashes
by
Jonas Maebe
[
Today
at 09:19:49 pm]
CompareText improvement
by
PascalDragon
[
Today
at 09:16:55 pm]
Synapse TCP/IP client and...
by
GetMem
[
Today
at 09:16:46 pm]
InterProcessCommunication...
by
BosseB
[
Today
at 09:15:40 pm]
When PC "sleeps" program ...
by
PascalDragon
[
Today
at 09:14:51 pm]
Question about IdMappedPo...
by
Remy Lebeau
[
Today
at 08:59:36 pm]
[Solved] Can a thumbnail ...
by
loaded
[
Today
at 08:49:10 pm]
fpc 3.3.1 or lazarus 2.3 ...
by
edgarrod71
[
Today
at 08:26:31 pm]
Help with HelpnDoc script...
by
cdbc
[
Today
at 07:32:08 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: [solve] tvPlanit - how to preselect a ressource? (Read 315 times)
Nicole
Hero Member
Posts: 743
[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: 10664
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: 743
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