mercredi 14 décembre 2011

Form Radiobutton values

Ever wondered where the values in a Form RadioButton come from?

The properties of the Radiobutton AOT-object only show one value.
Where's the rest?

As an example, I'm using the DEV_SysTableBrowser, which can be found on Axaptapedia.

The AOT of that project - folded out to the radiobutton - looks like this:


When we run the form, it looks like this:



The radiobutton is grouped in the "Show fields" group, and has 3 values:
  • All fields
  • Field group
  • User setup
The properties of that radiobutton are:


So, we know that there are 3 items, and that item 1 has the value (Text) "All fields".
But where are the other 2 values?
Actually, they are also there, and here's how to reveal them:

Step 1: Select the Item property



Step 2: Enter the number of the item for which you want to see or set the value


Step 3: Tab out of the Item property


Notice that the Text property still says "All fields" (Item 1), while we have indicated that we want to see Item 2.
This is due to a refresh issue.
The Text doesn't get refreshed when the Item property changes.
We'll have to do the refresh ourselves.

Step 4: Select the Text property


Step 5: Tab out of the Text property


And there you have the value of the second item :)

These values are actually stored in an array.
This is the part of the .XPO file that defines this RadioButton.
See the highlighted part.

Aucun commentaire:

Enregistrer un commentaire