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
[SOLVED] Limiting Search ...
by
Badger
[
Today
at 12:02:10 am]
ERROR: The current FPC ha...
by
BubikolRamios
[May 19, 2026, 11:49:03 pm]
Anubis activated
by
Joanna
[May 19, 2026, 11:40:12 pm]
wildcard utilities list
by
mas steindorff
[May 19, 2026, 11:30:25 pm]
TMemoryStream, manual mem...
by
marcov
[May 19, 2026, 09:57:59 pm]
paszlib. Feature request ...
by
Thausand
[May 19, 2026, 09:57:33 pm]
Portable verion of FPC an...
by
Thausand
[May 19, 2026, 09:53:48 pm]
Lazarus IDE on Kubuntu lo...
by
backprop
[May 19, 2026, 08:51:53 pm]
Flamerobin error-message
by
maurog
[May 19, 2026, 08:07:45 pm]
Esri shapefile writer
by
Hansvb
[May 19, 2026, 08:06:03 pm]
Feature suggestion - repe...
by
Warfley
[May 19, 2026, 07:38:40 pm]
TurboBird IBX
by
maurog
[May 19, 2026, 07:11:31 pm]
LazNodeEditor (visual nod...
by
CynicRus
[May 19, 2026, 06:48:15 pm]
TTimer not firing....
by
Prime
[May 19, 2026, 02:40:46 pm]
Lazarus portable?
by
marcov
[May 19, 2026, 01:24:21 pm]
Pure Pascal LZ4, LZ5 and ...
by
Tomxe
[May 19, 2026, 01:19:14 pm]
Infernal error when decom...
by
ginoo
[May 19, 2026, 09:52:43 am]
Cannot get FTP to work
by
Thaddy
[May 19, 2026, 07:15:33 am]
Linking a PortAudio stati...
by
Fred vS
[May 18, 2026, 10:53:41 pm]
When will lazarus actuall...
by
Curt Carpenter
[May 18, 2026, 08:59:21 pm]
StringGrid: which is "cur...
by
Bart
[May 18, 2026, 08:18:51 pm]
TShellTreeView TopItem
by
Paolo
[May 18, 2026, 06:53:15 pm]
duplicate an Object at ru...
by
Thaddy
[May 18, 2026, 03:57:51 pm]
How to wait until a WebDA...
by
Hartmut
[May 18, 2026, 03:47:14 pm]
Can /my/ AI help me with ...
by
microxa
[May 18, 2026, 01:16:57 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: Referring to TCheckGroup items by caption (Read 6997 times)
Leledumbo
Hero Member
Posts: 8836
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: 1946
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: 8836
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