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
InterProcessCommunication...
by
KodeZwerg
[
Today
at 08:03:55 pm]
Freeing at destructor TLa...
by
wp
[
Today
at 08:03:12 pm]
Save the same key ini fil...
by
BIT
[
Today
at 07:50:17 pm]
Question about IdMappedPo...
by
cappe
[
Today
at 07:42:40 pm]
Dark Theme in my program?
by
d7_2_laz
[
Today
at 07:25:51 pm]
Yet another FPC/embedded ...
by
DavidL
[
Today
at 06:38:45 pm]
what is Erro Code 0xc0000...
by
Thaddy
[
Today
at 06:18:07 pm]
CompareText improvement
by
Martin_fr
[
Today
at 06:05:19 pm]
[SOLVED] How to set initi...
by
AMJF
[
Today
at 05:41:59 pm]
An ASCII logo for Pascal ...
by
Fred vS
[
Today
at 05:20:16 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: [solve] tvPlanit - how to preselect a ressource? (Read 316 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: 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: 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