[Last Call] Learn how to a build a cloud-first strategyRegister Now



Posted on 2005-04-21
Medium Priority
Last Modified: 2010-04-05
How do I set a default value to an item in a TradioGroup control ?

Question by:amielDorel
LVL 27

Expert Comment

ID: 13840163
?? just set the itemindex-property to the radio which should selected (itemindex is zerobased)
LVL 15

Accepted Solution

mikelittlewood earned 1000 total points
ID: 13840916
If you want to do it in code on the OnShow of the form you can do

RadioGroup1.ItemIndex := 0;

If you want to set the default value to a specific string but you dont know its index you can use:

RadioGroup1.ItemIndex := RadioGroup1.Items.IndexOf('YourItem')

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Loops Section Overview
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses
Course of the Month18 days, left to enroll

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question