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
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
Search
Advanced search
Recent
Learn how to (un)dock a T...
by
Hansvb
[
Today
at 08:44:26 pm]
string argument as array ...
by
jamie
[
Today
at 08:26:49 pm]
Little Red Riding Hood (t...
by
Lulu
[
Today
at 08:04:22 pm]
compilerproc Problem by u...
by
paule32
[
Today
at 07:53:37 pm]
New version of BGRABitmap
by
circular
[
Today
at 07:53:02 pm]
DeleteDirectory doesn't a...
by
Bart
[
Today
at 07:43:20 pm]
LAMW arduino serial comm ...
by
jmpessoa
[
Today
at 07:38:54 pm]
problem with scrollbox
by
rcmz
[
Today
at 06:37:56 pm]
SynEdit
by
Martin_fr
[
Today
at 06:27:48 pm]
MacOS intel : Lazarus-dar...
by
Selzig
[
Today
at 05:58:28 pm]
I can write your README.m...
by
wp
[
Today
at 05:31:52 pm]
Daraja HTTP Framework 3.0...
by
mjustin
[
Today
at 05:16:20 pm]
AnchorDocking in my app
by
Fred vS
[
Today
at 04:50:30 pm]
my programs crash
by
turunk
[
Today
at 02:54:49 pm]
Looking for industrial pa...
by
krolikbest
[
Today
at 01:45:55 pm]
WM_ message List for dest...
by
paule32
[
Today
at 01:43:04 pm]
FPC 3.3.1 release date an...
by
Martin_fr
[
Today
at 01:08:18 pm]
I lost in Code ...
by
cdbc
[
Today
at 01:00:56 pm]
Feature request/suggestio...
by
440bx
[
Today
at 12:35:16 pm]
[solved] how to post a po...
by
Nicole
[
Today
at 12:12:45 pm]
Somebody interested by RT...
by
Dzandaa
[
Today
at 11:35:10 am]
Feature request/suggestio...
by
440bx
[
Today
at 10:50:23 am]
Serial port
by
MarkMLl
[
Today
at 09:21:57 am]
Ring Type Animation (cann...
by
Boleeman
[
Today
at 07:45:50 am]
Animated Amulet: Tentacle...
by
Boleeman
[
Today
at 07:41:05 am]
« previous
next »
Print
Pages: [
1
]
Author
Topic: Referring to TCheckGroup items by caption (Read 6859 times)
Leledumbo
Hero Member
Posts: 8801
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: 1931
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: 8801
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