Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

Felson's Law: To steal ideas from one person is plagiarism; to steal from many is research.


devel / comp.lang.ada / Re: Gtk in ada using radiobuttons

SubjectAuthor
* Gtk in ada using radiobuttonsldries46
+* Re: Gtk in ada using radiobuttonsLudovic Brenta
|`* Re: Gtk in ada using radiobuttonsJeffrey R.Carter
| `* Re: Gtk in ada using radiobuttonsLudovic Brenta
|  +* Re: Gtk in ada using radiobuttonsldries46
|  |+- Re: Gtk in ada using radiobuttonsLudovic Brenta
|  |`- Re: Gtk in ada using radiobuttonsLudovic Brenta
|  `- Re: Gtk in ada using radiobuttonsJeffrey R.Carter
`* Re: Gtk in ada using radiobuttonsldries46
 `* Re: Gtk in ada using radiobuttonsJeffrey R.Carter
  `* Re: Gtk in ada using radiobuttonsldries46
   `- Re: Gtk in ada using radiobuttonsLudovic Brenta

1
Gtk in ada using radiobuttons

<nnd$0c6be124$11646b54@413dc7685a372cde>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=8912&group=comp.lang.ada#8912

  copy link   Newsgroups: comp.lang.ada
Content-Type: multipart/mixed; boundary="------------pB4z71D4AESx0aeUZ0iw9wv4"
Date: Sat, 15 Oct 2022 16:28:47 +0200
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.3.3
Newsgroups: comp.lang.ada
From: bertus.dries@planet.nl (ldries46)
Subject: Gtk in ada using radiobuttons
Message-ID: <nnd$0c6be124$11646b54@413dc7685a372cde>
Organization: KPN B.V.
Path: i2pn2.org!i2pn.org!news.neodome.net!news.uzoreto.com!feeder.usenetexpress.com!tr2.eu1.usenetexpress.com!94.232.112.245.MISMATCH!feed.abavia.com!abe005.abavia.com!abp001.abavia.com!news.kpn.nl!not-for-mail
Lines: 198
Injection-Date: Sat, 15 Oct 2022 16:28:49 +0200
Injection-Info: news.kpn.nl; mail-complaints-to="abuse@kpn.com"
 by: ldries46 - Sat, 15 Oct 2022 14:28 UTC
Attachments: "CPP2Ada_Dialog_Type_Init.ads" (text/plain), "CPP2Ada_Dialog_Type_Init.adb" (text/plain)

I realized a set of two radiobuttons that should operate in a group,
either one or the other but I cannot find the correct way to combine
these two radio buttons although I can see the dialog in which they are
used. only both buttons are on and clicking on them cannot set either of
the off. I tried to find an example how to do this on internet.  I just
send the used files along. Can anybody help me.

Attachments: "CPP2Ada_Dialog_Type_Init.ads" (text/plain), "CPP2Ada_Dialog_Type_Init.adb" (text/plain)
Re: Gtk in ada using radiobuttons

<875yglqdtj.fsf@samuel>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=8914&group=comp.lang.ada#8914

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!weretis.net!feeder8.news.weretis.net!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: ludovic@ludovic-brenta.org (Ludovic Brenta)
Newsgroups: comp.lang.ada
Subject: Re: Gtk in ada using radiobuttons
Date: Sat, 15 Oct 2022 17:58:00 +0200
Organization: A noiseless patient Spider
Lines: 7
Message-ID: <875yglqdtj.fsf@samuel>
References: <nnd$0c6be124$11646b54@413dc7685a372cde>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: reader01.eternal-september.org; posting-host="bed06322e4a0783b1a09e8649079420d";
logging-data="2967389"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18atfZyXg5q2eWUf8tOcYFv"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
Cancel-Lock: sha1:bsmVEM3SKL7uLbbLZQeZqAOCxKU=
sha1:QbmqI1eq0s4svzmdCdanG89dz6s=
 by: Ludovic Brenta - Sat, 15 Oct 2022 15:58 UTC

Read the comments at the top of gtk-radio_button.ads; it explains how to
retrieve the group from the first radio button and then assign all other
buttons to that group. See Get_Group, Set_Group.

--
Ludovic Brenta.
Talent retention and emotional impact technically interact with scalabilities.

Re: Gtk in ada using radiobuttons

<nnd$5fe828a6$33713fd0@615a1ebc43f00050>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=8920&group=comp.lang.ada#8920

  copy link   Newsgroups: comp.lang.ada
Date: Sun, 16 Oct 2022 18:43:17 +0200
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.3.3
Subject: Re: Gtk in ada using radiobuttons
Content-Language: en-GB
Newsgroups: comp.lang.ada
References: <nnd$0c6be124$11646b54@413dc7685a372cde>
From: bertus.dries@planet.nl (ldries46)
In-Reply-To: <nnd$0c6be124$11646b54@413dc7685a372cde>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Message-ID: <nnd$5fe828a6$33713fd0@615a1ebc43f00050>
Organization: KPN B.V.
Path: i2pn2.org!i2pn.org!aioe.org!news.mixmin.net!newsreader4.netcologne.de!news.netcologne.de!peer01.ams1!peer.ams1.xlned.com!news.xlned.com!peer02.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!feed.abavia.com!abe006.abavia.com!abp002.abavia.com!news.kpn.nl!not-for-mail
Lines: 39
Injection-Date: Sun, 16 Oct 2022 18:43:19 +0200
Injection-Info: news.kpn.nl; mail-complaints-to="abuse@kpn.com"
X-Received-Bytes: 2474
 by: ldries46 - Sun, 16 Oct 2022 16:43 UTC

Op 15-10-2022 om 16:28 schreef ldries46:
> I realized a set of two radiobuttons that should operate in a group,
> either one or the other but I cannot find the correct way to combine
> these two radio buttons although I can see the dialog in which they
> are used. only both buttons are on and clicking on them cannot set
> either of the off. I tried to find an example how to do this on
> internet.  I just send the used files along. Can anybody help me.
>
>
As far as I can read in gtk-radio_button.ads the followinf dtatements
should do the trick:

      TypeDialog.Radio_Frame := Widget_SList.Null_List;
      TypeDialog.Radio_Header :=
Gtk_Radio_Button_New_With_Label(TypeDialog.Radio_Frame,To_String(Ext_C_Header(lan)));
      TypeDialog.Radio_CPP :=
Gtk_Radio_Button_New_With_Label(TypeDialog.Radio_Frame,
To_String(Ext_CPP_Header(lan)));

      Pack_Start
        (TypeDialog.Radio_Button_Box,
         TypeDialog.Radio_Header,
         Expand  => True,
         Fill    => True,
         Padding => 0);
      Pack_Start
        (TypeDialog.Radio_Button_Box,
         TypeDialog.Radio_CPP,
         Expand  => True,
         Fill    => True,
         Padding => 1);

But the dialog looks good with the exception that both buttons are
activated and cannot be deactivated. I still do want the choice between
the two I cannot find that in the When running in debugging mode I can
see that the group still is null

Re: Gtk in ada using radiobuttons

<tihocv$362qf$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=8921&group=comp.lang.ada#8921

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!aioe.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: spam.jrcarter.not@spam.acm.org.not (Jeffrey R.Carter)
Newsgroups: comp.lang.ada
Subject: Re: Gtk in ada using radiobuttons
Date: Sun, 16 Oct 2022 22:09:03 +0200
Organization: A noiseless patient Spider
Lines: 19
Message-ID: <tihocv$362qf$1@dont-email.me>
References: <nnd$0c6be124$11646b54@413dc7685a372cde> <875yglqdtj.fsf@samuel>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 16 Oct 2022 20:09:03 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="75c79658ccecd86e8b45732e215e30e0";
logging-data="3345231"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+UPX8bASp1oPS/Ty3ru/tJYHp4BBfi7xQ="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.2.2
Cancel-Lock: sha1:bQC1+JJtXY7otv/aGyohWtgXZlo=
In-Reply-To: <875yglqdtj.fsf@samuel>
Content-Language: en-US
 by: Jeffrey R.Carter - Sun, 16 Oct 2022 20:09 UTC

On 2022-10-15 17:58, Ludovic Brenta wrote:
> Read the comments at the top of gtk-radio_button.ads; it explains how to
> retrieve the group from the first radio button and then assign all other
> buttons to that group. See Get_Group, Set_Group.

I know of no reason why the client of a GUI library would ever create a single,
independent radio button. A single radio button is useless. One always wants to
create a set of linked buttuns. A GUI library that makes the client do extra
work to achieve this is poorly designed.

--
Jeff Carter
"No one is to stone anyone until I blow this whistle,
do you understand? Even--and I want to make this
absolutely clear--even if they do say, 'Jehovah.'"
Monty Python's Life of Brian
74

Re: Gtk in ada using radiobuttons

<tihoj1$362qe$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=8922&group=comp.lang.ada#8922

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!aioe.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: spam.jrcarter.not@spam.acm.org.not (Jeffrey R.Carter)
Newsgroups: comp.lang.ada
Subject: Re: Gtk in ada using radiobuttons
Date: Sun, 16 Oct 2022 22:12:17 +0200
Organization: A noiseless patient Spider
Lines: 18
Message-ID: <tihoj1$362qe$1@dont-email.me>
References: <nnd$0c6be124$11646b54@413dc7685a372cde>
<nnd$5fe828a6$33713fd0@615a1ebc43f00050>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 16 Oct 2022 20:12:17 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="75c79658ccecd86e8b45732e215e30e0";
logging-data="3345230"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/eAOpcGBA6BHDboui+G6d9S2KF/GPL3EQ="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.2.2
Cancel-Lock: sha1:wCnxva5cZT4efGyMJAFhu9FMp5s=
In-Reply-To: <nnd$5fe828a6$33713fd0@615a1ebc43f00050>
Content-Language: en-US
 by: Jeffrey R.Carter - Sun, 16 Oct 2022 20:12 UTC

On 2022-10-16 18:43, ldries46 wrote:
>
> But the dialog looks good with the exception that both buttons are activated and
> cannot be deactivated. I still do want the choice between the two I cannot find
> that in the When running in debugging mode I can see that the group still is null

A set of 2 radio buttons is usually equivalent to a check box, which is visually
simpler as well.

--
Jeff Carter
"No one is to stone anyone until I blow this whistle,
do you understand? Even--and I want to make this
absolutely clear--even if they do say, 'Jehovah.'"
Monty Python's Life of Brian
74

Re: Gtk in ada using radiobuttons

<87sfjnpgak.fsf@samuel>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=8923&group=comp.lang.ada#8923

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!aioe.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: ludovic@ludovic-brenta.org (Ludovic Brenta)
Newsgroups: comp.lang.ada
Subject: Re: Gtk in ada using radiobuttons
Date: Mon, 17 Oct 2022 00:14:27 +0200
Organization: A noiseless patient Spider
Lines: 21
Message-ID: <87sfjnpgak.fsf@samuel>
References: <nnd$0c6be124$11646b54@413dc7685a372cde> <875yglqdtj.fsf@samuel>
<tihocv$362qf$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: reader01.eternal-september.org; posting-host="ee0e2c84afcad055c5f67be1d556b344";
logging-data="3413743"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+kG1xx9RIhXtgLB6UXeCBt"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
Cancel-Lock: sha1:huu1r70z52z6JMBxdWutKVhBV94=
sha1:s1gHJenIBwr7zVFORvp5Uq12V1k=
 by: Ludovic Brenta - Sun, 16 Oct 2022 22:14 UTC

"Jeffrey R.Carter" <spam.jrcarter.not@spam.acm.org.not> writes:
> On 2022-10-15 17:58, Ludovic Brenta wrote:
>> Read the comments at the top of gtk-radio_button.ads; it explains how to
>> retrieve the group from the first radio button and then assign all other
>> buttons to that group. See Get_Group, Set_Group.
>
> I know of no reason why the client of a GUI library would ever create
> a single, independent radio button. A single radio button is useless.
> One always wants to create a set of linked buttuns.

Yes but you create the radio buttons one at a time, so one of the
buttons must be the first you create.

> A GUI library that makes the client do extra work to achieve this is
> poorly designed.

Agreed but since you've read the documentation by now, you know about
Gtk_Radio_Button_New_With_Label_From_Widget.

--
Ludovic Brenta.

Re: Gtk in ada using radiobuttons

<nnd$02e70f42$41ce37c0@29271548fdb2d119>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=8924&group=comp.lang.ada#8924

  copy link   Newsgroups: comp.lang.ada
Date: Mon, 17 Oct 2022 08:56:09 +0200
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.3.3
Subject: Re: Gtk in ada using radiobuttons
Newsgroups: comp.lang.ada
References: <nnd$0c6be124$11646b54@413dc7685a372cde>
<nnd$5fe828a6$33713fd0@615a1ebc43f00050> <tihoj1$362qe$1@dont-email.me>
Content-Language: en-GB
From: bertus.dries@planet.nl (ldries46)
In-Reply-To: <tihoj1$362qe$1@dont-email.me>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Message-ID: <nnd$02e70f42$41ce37c0@29271548fdb2d119>
Organization: KPN B.V.
Path: i2pn2.org!i2pn.org!news.nntp4.net!news.gegeweb.eu!gegeweb.org!usenet-fr.net!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!193.141.40.65.MISMATCH!npeer.as286.net!npeer-ng0.as286.net!peer02.ams1!peer.ams1.xlned.com!news.xlned.com!peer01.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!feed.abavia.com!abe006.abavia.com!abp003.abavia.com!news.kpn.nl!not-for-mail
Lines: 15
Injection-Date: Mon, 17 Oct 2022 08:56:09 +0200
Injection-Info: news.kpn.nl; mail-complaints-to="abuse@kpn.com"
X-Received-Bytes: 1594
 by: ldries46 - Mon, 17 Oct 2022 06:56 UTC

Op 16-10-2022 om 22:12 schreef Jeffrey R.Carter:
> On 2022-10-16 18:43, ldries46 wrote:
>>
>> But the dialog looks good with the exception that both buttons are
>> activated and cannot be deactivated. I still do want the choice
>> between the two I cannot find that in the When running in debugging
>> mode I can see that the group still is null
>
> A set of 2 radio buttons is usually equivalent to a check box, which
> is visually simpler as well.
>
Building a program is sometimes a step by step process. It may be
possible that I need a third or even a fourth possibility in the choice,
so in my opinion it is good to anticipate

Re: Gtk in ada using radiobuttons

<nnd$7c46d8db$3ad874e6@2bc15c91e8fd3fa8>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=8925&group=comp.lang.ada#8925

  copy link   Newsgroups: comp.lang.ada
Date: Mon, 17 Oct 2022 09:27:11 +0200
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.3.3
Subject: Re: Gtk in ada using radiobuttons
Content-Language: en-GB
Newsgroups: comp.lang.ada
References: <nnd$0c6be124$11646b54@413dc7685a372cde> <875yglqdtj.fsf@samuel>
<tihocv$362qf$1@dont-email.me> <87sfjnpgak.fsf@samuel>
From: bertus.dries@planet.nl (ldries46)
In-Reply-To: <87sfjnpgak.fsf@samuel>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Message-ID: <nnd$7c46d8db$3ad874e6@2bc15c91e8fd3fa8>
Organization: KPN B.V.
Path: i2pn2.org!i2pn.org!aioe.org!news.mixmin.net!npeer.as286.net!npeer-ng0.as286.net!peer03.ams1!peer.ams1.xlned.com!news.xlned.com!peer02.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!feed.abavia.com!abe005.abavia.com!abp002.abavia.com!news.kpn.nl!not-for-mail
Lines: 24
Injection-Date: Mon, 17 Oct 2022 09:27:12 +0200
Injection-Info: news.kpn.nl; mail-complaints-to="abuse@kpn.com"
X-Received-Bytes: 2256
 by: ldries46 - Mon, 17 Oct 2022 07:27 UTC

Op 17-10-2022 om 0:14 schreef Ludovic Brenta:
> "Jeffrey R.Carter" <spam.jrcarter.not@spam.acm.org.not> writes:
>> On 2022-10-15 17:58, Ludovic Brenta wrote:
>>> Read the comments at the top of gtk-radio_button.ads; it explains how to
>>> retrieve the group from the first radio button and then assign all other
>>> buttons to that group. See Get_Group, Set_Group.
>> I know of no reason why the client of a GUI library would ever create
>> a single, independent radio button. A single radio button is useless.
>> One always wants to create a set of linked buttuns.
> Yes but you create the radio buttons one at a time, so one of the
> buttons must be the first you create.
>
>> A GUI library that makes the client do extra work to achieve this is
>> poorly designed.
> Agreed but since you've read the documentation by now, you know about
> Gtk_Radio_Button_New_With_Label_From_Widget.
>
Finally I had the correct view and working of my dialogue.
But the very first remark I made stays true for someone trying to use
Gtk is stays a problem without good example code.
Examples are almost always a better way to learn something while the
description in the ads files are always technically correct descriptions
of the function and not how the function interacts with all other functions.

Re: Gtk in ada using radiobuttons

<tij346$3d8sm$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=8926&group=comp.lang.ada#8926

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!aioe.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: spam.jrcarter.not@spam.acm.org.not (Jeffrey R.Carter)
Newsgroups: comp.lang.ada
Subject: Re: Gtk in ada using radiobuttons
Date: Mon, 17 Oct 2022 10:18:13 +0200
Organization: A noiseless patient Spider
Lines: 47
Message-ID: <tij346$3d8sm$1@dont-email.me>
References: <nnd$0c6be124$11646b54@413dc7685a372cde> <875yglqdtj.fsf@samuel>
<tihocv$362qf$1@dont-email.me> <87sfjnpgak.fsf@samuel>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 17 Oct 2022 08:18:14 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="55607fdfa719fa76daf25f21221b219d";
logging-data="3580822"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18HVQzIdj5IRxbFnXkQHdrYhJKyPvjTqr8="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.2.2
Cancel-Lock: sha1:kXew2fDJlX7z/XE9u/ljS53EPEU=
In-Reply-To: <87sfjnpgak.fsf@samuel>
Content-Language: en-US
 by: Jeffrey R.Carter - Mon, 17 Oct 2022 08:18 UTC

On 2022-10-17 00:14, Ludovic Brenta wrote:
> "Jeffrey R.Carter" <spam.jrcarter.not@spam.acm.org.not> writes:
>>
>> I know of no reason why the client of a GUI library would ever create
>> a single, independent radio button. A single radio button is useless.
>> One always wants to create a set of linked buttons.
>
> Yes but you create the radio buttons one at a time, so one of the
> buttons must be the first you create.

This may be necessary at a low level in the GUI, but there's no reason why the
client-interface pkg of a library can't provide a higher-level interface.
Consider the equivalent from Ada GUI
(https://github.com/jrcarter/Ada_GUI/blob/master/ada_gui.ads):

type Text_List is array (Positive range <>) of
Ada.Strings.Unbounded.Unbounded_String
with
Dynamic_Predicate => Text_List'First = 1;

type Orientation_ID is (Horizontal, Vertical);

function New_Radio_Buttons (Row : Positive := 1;
Column : Positive := 1;
Label : Text_List;
Break_Before : Boolean := False;
Orientation : Orientation_ID := Vertical)
return Widget_ID with Pre => Set_Up and Label'Length > 1;
-- Creates Label'Length radio buttons; Label contains the labels for the
-- buttons
-- Orientation = Horizontal results in a row of buttons
-- = Vertical has each button after the 1st below the preceding
buttons
-- The button for Label'First will be active
-- The operations Set_Active and Active for radio buttons take an Index;
-- Index will refer to the button for Label (Index)

An implementation based on, say, GTK, will have to create the buttons
individually as the GUI requires, but the client doesn't have to deal with that.

--
Jeff Carter
"The men get one hot meal a day: a bowl of steam."
Take the Money and Run
145

Re: Gtk in ada using radiobuttons

<87o7uapumm.fsf@samuel>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=8927&group=comp.lang.ada#8927

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: ludovic@ludovic-brenta.org (Ludovic Brenta)
Newsgroups: comp.lang.ada
Subject: Re: Gtk in ada using radiobuttons
Date: Mon, 17 Oct 2022 13:17:05 +0200
Organization: A noiseless patient Spider
Lines: 21
Message-ID: <87o7uapumm.fsf@samuel>
References: <nnd$0c6be124$11646b54@413dc7685a372cde>
<nnd$5fe828a6$33713fd0@615a1ebc43f00050>
<tihoj1$362qe$1@dont-email.me>
<nnd$02e70f42$41ce37c0@29271548fdb2d119>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: reader01.eternal-september.org; posting-host="ee0e2c84afcad055c5f67be1d556b344";
logging-data="3610099"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+qkmSCeluxXadZVP+sWSP6"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
Cancel-Lock: sha1:7sOAsbVl+Xa89RYhj5mRYHGnN/Y=
sha1:Y9L8b2olWzQqBm1GDLFOfz6QAUs=
 by: Ludovic Brenta - Mon, 17 Oct 2022 11:17 UTC

ldries46 <bertus.dries@planet.nl> writes:
> Op 16-10-2022 om 22:12 schreef Jeffrey R.Carter:
>> On 2022-10-16 18:43, ldries46 wrote:
>>>
>>> But the dialog looks good with the exception that both buttons are
>>> activated and cannot be deactivated. I still do want the choice
>>> between the two I cannot find that in the When running in debugging
>>> mode I can see that the group still is null
>>
>> A set of 2 radio buttons is usually equivalent to a check box, which
>> is visually simpler as well.
>>
> Building a program is sometimes a step by step process. It may be
> possible that I need a third or even a fourth possibility in the
> choice, so in my opinion it is good to anticipate

That's what I assumed. Have you considered a Gtk_Combo_Box as an alternative?

--
Ludovic Brenta.
The attackers re-invent our correlations. As a result, co-innovations swiftly revolutionise our projections.

Re: Gtk in ada using radiobuttons

<87k04ypukv.fsf@samuel>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=8928&group=comp.lang.ada#8928

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!aioe.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: ludovic@ludovic-brenta.org (Ludovic Brenta)
Newsgroups: comp.lang.ada
Subject: Re: Gtk in ada using radiobuttons
Date: Mon, 17 Oct 2022 13:18:08 +0200
Organization: A noiseless patient Spider
Lines: 13
Message-ID: <87k04ypukv.fsf@samuel>
References: <nnd$0c6be124$11646b54@413dc7685a372cde> <875yglqdtj.fsf@samuel>
<tihocv$362qf$1@dont-email.me> <87sfjnpgak.fsf@samuel>
<nnd$7c46d8db$3ad874e6@2bc15c91e8fd3fa8>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: reader01.eternal-september.org; posting-host="ee0e2c84afcad055c5f67be1d556b344";
logging-data="3610099"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX188x8AKnlLEnrq2JNC6Gysk"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
Cancel-Lock: sha1:Tx0gRdbzqI5iXVGmtTwyvvfTn8U=
sha1:p+7ftk3PAagw+avr1ZmxNC3WX2U=
 by: Ludovic Brenta - Mon, 17 Oct 2022 11:18 UTC

ldries46 <bertus.dries@planet.nl> writes:
> Finally I had the correct view and working of my dialogue.
> But the very first remark I made stays true for someone trying to use
> Gtk is stays a problem without good example code.

There is example code in the doc but written in C; trivial to translate
to Ada.

https://docs.gtk.org/gtk3/class.RadioButton.html

--
Ludovic Brenta.
Going forward, a leadership effectiveness strengthens the enablers.

Re: Gtk in ada using radiobuttons

<87fsfmpucv.fsf@samuel>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=8929&group=comp.lang.ada#8929

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!news.nntp4.net!usenet.goja.nl.eu.org!3.eu.feeder.erje.net!feeder.erje.net!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: ludovic@ludovic-brenta.org (Ludovic Brenta)
Newsgroups: comp.lang.ada
Subject: Re: Gtk in ada using radiobuttons
Date: Mon, 17 Oct 2022 13:22:56 +0200
Organization: A noiseless patient Spider
Lines: 14
Message-ID: <87fsfmpucv.fsf@samuel>
References: <nnd$0c6be124$11646b54@413dc7685a372cde> <875yglqdtj.fsf@samuel>
<tihocv$362qf$1@dont-email.me> <87sfjnpgak.fsf@samuel>
<nnd$7c46d8db$3ad874e6@2bc15c91e8fd3fa8>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: reader01.eternal-september.org; posting-host="ee0e2c84afcad055c5f67be1d556b344";
logging-data="3610099"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19EhlZLht0VivA0I1sRwI6c"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
Cancel-Lock: sha1:HOLBi7lEitobHTsW+Jis5mQPD0M=
sha1:Hlc0HVGH88CQTs1P9c13XjaVRFA=
 by: Ludovic Brenta - Mon, 17 Oct 2022 11:22 UTC

ldries46 <bertus.dries@planet.nl> writes:
> Finally I had the correct view and working of my dialogue.
> But the very first remark I made stays true for someone trying to use
> Gtk is stays a problem without good example code.

Also, GtkAda comes with a complete example code called testgtk, which
shows how to use every type of widget. In the case of radio buttons,
look at the file create_radio_buttons.adb. On Debian and derivatives,
this is installed as part of package libgtkada-doc, as
/usr/share/doc/libgtkada-doc/examples/testgtk.tgz.

--
Ludovic Brenta.
The Chief Risk Appetite Officer reaches out our systems.


devel / comp.lang.ada / Re: Gtk in ada using radiobuttons

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor