Lazarus
Home
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Programming
»
LCL
»
To get the selected item of TRadioGroup
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
Setting TStringGrid exten...
by
Blaazen
[
Today
at 08:31:08 pm]
[SOLVED] Font question
by
Pe3s
[
Today
at 08:17:50 pm]
centered text in progress...
by
wp
[
Today
at 08:05:53 pm]
MyDbfStudio - New Admin t...
by
vinceducat
[
Today
at 07:39:14 pm]
Question about IdMappedPo...
by
Remy Lebeau
[
Today
at 07:37:22 pm]
Help with tsearchrec
by
Remy Lebeau
[
Today
at 07:30:22 pm]
Freeing at destructor TLa...
by
lagprogramming
[
Today
at 07:26:58 pm]
Can I create System Prefe...
by
ozznixon
[
Today
at 07:07:39 pm]
SQL - looks easy but I ca...
by
af0815
[
Today
at 06:35:18 pm]
Compilation error with CP...
by
Thaddy
[
Today
at 05:20:42 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: To get the selected item of TRadioGroup (Read 3424 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: 1918
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