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
How to display barcode co...
by
Jonvy
[
Today
at 04:50:22 pm]
class function TCDWSButto...
by
lagprogramming
[
Today
at 04:49:53 pm]
Pasar punteros de DLL C a...
by
Edson
[
Today
at 04:36:37 pm]
SQL - looks easy but I ca...
by
rvk
[
Today
at 04:22:30 pm]
An ASCII logo for Pascal ...
by
mika
[
Today
at 04:21:41 pm]
Code-Review Request: Alte...
by
Martin_fr
[
Today
at 04:10:16 pm]
TControl.ChangeBounds loo...
by
domasz
[
Today
at 03:47:04 pm]
Patch for fixing a TextOu...
by
Bart
[
Today
at 03:02:12 pm]
Lazarus visual components
by
Onur2x
[
Today
at 02:06:37 pm]
CompareText improvement
by
marcov
[
Today
at 01:57:28 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: [solve] tvPlanit - how to preselect a ressource? (Read 313 times)
Nicole
Hero Member
Posts: 741
[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: 10644
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: 741
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