Lazarus
Home
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Programming
»
LCL
»
Referring to TCheckGroup items by caption
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
GIT
Mailing List
Other languages
Foundation
Website
Useful Wiki Links
Project Roadmap
Getting the Source
Screenshots
How to use the forum
Forum Rules
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
Search
Advanced search
Recent
Why does the call via fun...
by
ASerge
[
Today
at 10:06:19 pm]
TLazSerial : serial port ...
by
CM630
[
Today
at 09:56:09 pm]
Question re. FCL's ssocke...
by
jamie
[
Today
at 09:23:35 pm]
connecting to mariadb
by
alanyoung
[
Today
at 05:57:03 pm]
delete cookies
by
Leledumbo
[
Today
at 05:14:27 pm]
[hacked for now] Changing...
by
jamie
[
Today
at 04:40:15 pm]
Error: Enumeration symbol...
by
nanobit
[
Today
at 04:17:38 pm]
AI interactions
by
Zvoni
[
Today
at 02:19:48 pm]
Recomendations for conver...
by
kompustelnik
[
Today
at 11:20:05 am]
Qt6 / X11: problem with G...
by
paweld
[
Today
at 11:14:43 am]
[Solved] Lookup field: er...
by
BlueIcaro
[
Today
at 09:59:57 am]
LCL Web Native with D2Bri...
by
egsuh
[
Today
at 08:10:14 am]
Access Violation - Databa...
by
Xenno
[
Today
at 06:21:52 am]
SpkToolbar custom update
by
wp
[December 14, 2025, 11:55:55 pm]
MVP made easier.
by
cdbc
[December 14, 2025, 05:14:40 pm]
Lazarus is not working
by
Fred vS
[December 14, 2025, 05:14:20 pm]
TIBDataSet "Closing"? on ...
by
RedOctober
[December 14, 2025, 04:52:18 pm]
Running External Tools
by
JuhaManninen
[December 14, 2025, 04:08:28 pm]
The start of yet another ...
by
TBMan
[December 14, 2025, 03:16:21 pm]
Need help with Runcommand...
by
marcov
[December 14, 2025, 12:46:25 pm]
Military Grade Directives
by
Thaddy
[December 14, 2025, 11:46:44 am]
Cannot find Online Packag...
by
Thaddy
[December 14, 2025, 11:37:58 am]
Anyone interested in help...
by
ad1mt
[December 14, 2025, 08:56:20 am]
Hashing pointers by using...
by
440bx
[December 14, 2025, 03:16:33 am]
exception external SIGSEG...
by
dseligo
[December 14, 2025, 02:24:28 am]
« previous
next »
Print
Pages: [
1
]
Author
Topic: Referring to TCheckGroup items by caption (Read 6931 times)
Leledumbo
Hero Member
Posts: 8834
Programming + Glam Metal + Tae Kwon Do = Me
Referring to TCheckGroup items by caption
«
on:
September 06, 2010, 10:36:05 am »
Sometimes it's not convenient to look for checked items through TCheckGroup.Checked[<Integer>], since the index will change when the order is changed. Is there any other property to access it by caption ? e.g. TCheckGroup.Checked['An item']
Logged
Follow this if you want me to answer:
http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F
http://pascalgeek.blogspot.com
https://bitbucket.org/leledumbo
https://github.com/leledumbo
Code first, think later - Natural programmer B)
theo
Global Moderator
Hero Member
Posts: 1933
Re: Referring to TCheckGroup items by caption
«
Reply #1 on:
September 06, 2010, 11:25:09 am »
TCheckGroup's Items are TStrings, so you can use IndexOf.
Code: Pascal
[Select]
[+]
[-]
var
idx
:
Integer
;
begin
idx
:
=
CheckGroup1
.
Items
.
IndexOf
(
'zwei'
)
;
if
idx>
-
1
then
CheckGroup1
.
Checked
[
idx
]
:
=
true
;
end
;
Logged
Leledumbo
Hero Member
Posts: 8834
Programming + Glam Metal + Tae Kwon Do = Me
Re: Referring to TCheckGroup items by caption
«
Reply #2 on:
September 07, 2010, 07:24:11 am »
Doh!, I didn't realize that. Thanks
.
Logged
Follow this if you want me to answer:
http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F
http://pascalgeek.blogspot.com
https://bitbucket.org/leledumbo
https://github.com/leledumbo
Code first, think later - Natural programmer B)
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Programming
»
LCL
»
Referring to TCheckGroup items by caption
TinyPortal
© 2005-2018