Lazarus
Home
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Programming
»
LCL
»
To get the selected item of TRadioGroup
Free Pascal
Website
Downloads
Wiki
Bugtracker
Mailing List
Lazarus
Website
Downloads (Laz+FPC)
Packages (OPM)
FAQ
Wiki
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
New VirtualTreeView for L...
by
El Salvador
[
Today
at 11:22:37 pm]
capture apl_exec stdout
by
toby
[
Today
at 11:07:32 pm]
GetObjectProp: Sample fro...
by
af0815
[
Today
at 10:50:27 pm]
error release when memo.s...
by
dseligo
[
Today
at 10:36:24 pm]
Want to see something fun...
by
OC DelGuy
[
Today
at 10:33:29 pm]
Best way to parse file.
by
Warfley
[
Today
at 09:14:30 pm]
lazreport load image from...
by
hamacker
[
Today
at 08:55:01 pm]
is there a "Lazarus.ini"?
by
qk
[
Today
at 08:53:20 pm]
pls advice for good style...
by
KodeZwerg
[
Today
at 08:17:23 pm]
GtoH
by
circular
[
Today
at 08:08:50 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: To get the selected item of TRadioGroup (Read 3407 times)
asdf
Sr. Member
Posts: 310
To get the selected item of TRadioGroup
«
on:
December 02, 2010, 05:37:13 pm »
sp1, sp2, sp3 : string;
RadioGroup1.Items.Add(sp1);
RadioGroup1.Items.Add(sp2);
RadioGroup1.Items.Add(sp3);
How can we get
the caption
of the selected item?
Logged
Lazarus 1.2.4 / Win 32 / THAILAND
theo
Global Moderator
Hero Member
Posts: 1917
Re: To get the selected item of TRadioGroup
«
Reply #1 on:
December 02, 2010, 05:49:36 pm »
Code: Pascal
[Select]
[+]
[-]
var
idx
:
integer
;
begin
idx
:
=
RadioGroup1
.
ItemIndex
;
if
idx>
-
1
then
Caption
:
=
RadioGroup1
.
Items
[
idx
]
;
end
;
Logged
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Programming
»
LCL
»
To get the selected item of TRadioGroup
TinyPortal
© 2005-2018