FolderItems and names of items inside them

Sorry, guys, I’m here again :pensive:
I have a question regarding FolderItems: I have a RdioButtonGroup with three choices, how can I have the app let me choose the folder and automatically open my choice of file inside it when I push the OK button?
Let me clarify, say my choices are the following files (created by my app):
a
b
c
I choose b and, via SelectionChanged, I can navigate to the folder where those files are. How can I have b automatically selected when I push the OK button without having me to double click it with the mouse (assuming it is possible)?

Thank you

Sounds like you looking for

YourRadioGroup.SelectedIndex = 1

You should read the docs for DesktopRadioGroup — Xojo documentation

Not really.
The issue is not getting data from the RadioGroup, it is transferring the SeelctedItem into the FolderItem so it can open the file by itself without my intervention (except choosing the folder)

The SelectedItem is A FolderItem representing A, B or C.

So, you copy its value to the FolderItem (Window Property) you Open in the OK button.

What do you mean by “navigate”? Is your item “b” a folder for which you want the user to navigate using a SelectFolder dialog?

For the first part, once the parent folder has been chosen, keep a reference to it using a window’s property: e.g. “ChosenFolder as FolderItem”.
When a radio button is selected, use “Var Item as FolderItem=ChosenFolder.Child(“a”)” to access the folder “a” inside the chosen folder. Add checks for whether ChosenFolder is nil, and various other things.

You want to select the radio button “b” when clicking the “OK” button? Wrong design, IMO. The default radio button should be selected when the window shows, and the OK button shouldn’t alter the selection made by the user; it should rather go on with the selection.
Also, what did you plan to double click on?

Items , b, and c are not folders, they are files inside some folder which I can reach. Selected by a RadioButton, I’d like them to open without having to choose, once inside the specific folder.
I know that all in all it is a wrong design. I have no intention (nor the ability) to commercalize or distribute my codes. I do it for my own fun only, and some use I can put them to.
Mostly is just a test to find how I can accomplish things, even those that make very little sense, programmingwise, and keep them in storage for whatever the future brings. They may never be necessary or useful but if neede, even in some twisted way, I have them in storage.
I know it’s crazy but, as I said, it’s just for fun

I did it. Got no answer for what I was looking for