Hello Jeff,
> Le 12 avr. 2018 à 21:06, Jeffrey R. Carter a écrit :
>
> However
>
> Active (Radio, 1)
>
> returns False when R1 has the black circle, and True when R2 has it. I expect
> the opposite. I can't figure out what I've done wrong, and hope someone here
> will see what I'm missing.
Ra
On 04/12/2018 09:06 PM, Jeffrey R. Carter wrote:
>
>All_Buttons : for I in Label'Range loop
> Result.Radio (I).Button.Create
> (Form => Form, Checked => I = Label'First, Name => Name);
> Result.Radio (I).Label.Create (Form => Form,
>
I do not know but creating three or more and then finding out which of those
ends up active might allow you to more easily determine the problem.
>Radio := New_Radio_Buttons (Label => (1 => To_Unbounded_String ("R1"),
> 2 => To_Unbounded_String ("R2") ) );
>
I updated the example in git to show using a single handler and value
(On_Change for radios is only called when a radio is selected not
deselected, which makes checking for Radio.Checked unnecessary):
procedure Radio_Select (Element : in out Gnoga.Gui.Base.Base_Type'Class)
is
Radio : Form
>
> I presume one has to iterate over the buttons in a group, testing Checked,
> to
> find the currently checked button.
>
>
You could also set a value on each and use a single event handler that
updates a variable.
David Botton
-
On 01/07/2016 09:18 PM, Rabbi David Botton wrote:
> I've pushed and example of using Radio Buttons into test/align.adb and I've
> added a comment on its use their spec.
Thanks. Giving them all the same Name was what I was missing.
I presume one has to iterate over the buttons in a group, testing
I've pushed and example of using Radio Buttons into test/align.adb and I've
added a comment on its use their spec.
Here are the relevant lines of code that will probably demystify their use:
-- These radio buttons will operate individually since Radios function
-- as groups based on the N