comp.lang.ada
 help / color / mirror / Atom feed
* Gtk Ada Radio Group
@ 2019-08-21  8:21 ldries46
  2019-08-21 15:55 ` Jeffrey R. Carter
  0 siblings, 1 reply; 3+ messages in thread
From: ldries46 @ 2019-08-21  8:21 UTC (permalink / raw)


I am trying to get working version of a Radio Button Group.
For various reasons I don't want to do this by using Glade. 
The Code compiles correctly and presents itself correctly in the dialog
But it does not behave as a group. All Buttons are activated.
What is wrong?

Here the instalization code is presented
I just cannot find any examples how to do this
      ---------------------------------------------------------------
      -- Radio Button Box
      ---------------------------------------------------------------
      Gtk_New (MainDialog.Radio_Grp, Orientation_Vertical, 0);
      Gtk_New (MainDialog.Input_Radio1, Orientation_Horizontal, 0);
      Gtk_New (MainDialog.Input_Radio2, Orientation_Horizontal, 0);
      Gtk_New (MainDialog.Input_Radio3, Orientation_Horizontal, 0);
      Gtk_New (MainDialog.Radio1_But, MainDialog.Radio_Group, "Radio 1");
      Gtk_New (MainDialog.Radio2_But, MainDialog.Radio_Group, "Radio 2");
      Gtk_New (MainDialog.Radio3_But, MainDialog.Radio_Group, "Radio 3");
      Pack_Start
        (MainDialog.Input_Radio1,
         MainDialog.Radio1_But,
         Expand  => True,
         Fill    => True,
         Padding => 0);
      Pack_Start
        (MainDialog.Radio_Grp,
         MainDialog.Input_Radio1,
         Expand  => True,
         Fill    => True,
         Padding => 0);
      Pack_Start
        (MainDialog.Input_Radio2,
         MainDialog.Radio2_But,
         Expand  => True,
         Fill    => True,
         Padding => 0);
      Pack_Start
        (MainDialog.Radio_Grp,
         MainDialog.Input_Radio2,
         Expand  => True,
         Fill    => True,
         Padding => 0);
      Pack_Start
        (MainDialog.Input_Radio3,
         MainDialog.Radio3_But,
         Expand  => True,
         Fill    => True,
         Padding => 0);
      Pack_Start
        (MainDialog.Radio_Grp,
         MainDialog.Input_Radio3,
         Expand  => True,
         Fill    => True,
         Padding => 0);
      Pack_Start
        (MainDialog.Dialog_Box,
         MainDialog.Radio_Grp,
         Expand  => True,
         Fill    => True,
         Padding => 0);
L. Dries


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Gtk Ada Radio Group
  2019-08-21  8:21 Gtk Ada Radio Group ldries46
@ 2019-08-21 15:55 ` Jeffrey R. Carter
  2019-08-22  5:15   ` ldries46
  0 siblings, 1 reply; 3+ messages in thread
From: Jeffrey R. Carter @ 2019-08-21 15:55 UTC (permalink / raw)


On 8/21/19 10:21 AM, ldries46 wrote:
> I am trying to get working version of a Radio Button Group.
> For various reasons I don't want to do this by using Glade. The Code compiles 
> correctly and presents itself correctly in the dialog
> But it does not behave as a group. All Buttons are activated.

Typically, I did something like this:

Gtk_New (Radio_Button => R1, Group => R1, Label => "R1");
Gtk_New (Radio_Button => R2, Group => R1, Label => "R2");
Gtk_New (Radio_Button => R3, Group => R1, Label => "R3");

-- 
Jeff Carter
"I would never want to belong to any club that
would have someone like me for a member."
Annie Hall
41

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Gtk Ada Radio Group
  2019-08-21 15:55 ` Jeffrey R. Carter
@ 2019-08-22  5:15   ` ldries46
  0 siblings, 0 replies; 3+ messages in thread
From: ldries46 @ 2019-08-22  5:15 UTC (permalink / raw)


This Worked

Thanks

"Jeffrey R. Carter"  schreef in bericht news:qjjpif$cav$1@dont-email.me...

On 8/21/19 10:21 AM, ldries46 wrote:
> I am trying to get working version of a Radio Button Group.
> For various reasons I don't want to do this by using Glade. The Code 
> compiles correctly and presents itself correctly in the dialog
> But it does not behave as a group. All Buttons are activated.

Typically, I did something like this:

Gtk_New (Radio_Button => R1, Group => R1, Label => "R1");
Gtk_New (Radio_Button => R2, Group => R1, Label => "R2");
Gtk_New (Radio_Button => R3, Group => R1, Label => "R3");

-- 
Jeff Carter
"I would never want to belong to any club that
would have someone like me for a member."
Annie Hall
41 


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-08-22  5:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-21  8:21 Gtk Ada Radio Group ldries46
2019-08-21 15:55 ` Jeffrey R. Carter
2019-08-22  5:15   ` ldries46

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox