Jump to content
Ian Branch

Pre-select a Radiobutton in a TTaskDialog?

Recommended Posts

Hi Team,

I am programmatically creating a TTaskDialog with two RadioButtons.  All good.

Based on a separate input I want to preselect one of the two radio buttons before displaying the dialog so the user can see which 'option' is currently enabled.

What's the trick for this?  I thought the following would do it but no.   "RadioButtons.Items[0].SetInitialState".

All the 'help' I can find don't seem to address this action. 😞

Regards & TIA,


Edited by Ian Branch
Correct spelling.

Share this post

Link to post
4 hours ago, Ian Branch said:


Setting 'default' will select it.

Share this post

Link to post

Hi FredS,

Thanks for that.  Works a treat.

      if MyTest then
        RadioButtons.Items[0].Default := True
        RadioButtons.Items[1].Default := True;



Share this post

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now