Page 1 of 1

RADIO Button problem

Posted: Tue Jun 08, 2021 10:21 pm
by Armando
Hi everybody

In a group of RADIO buttons when the dialog to choose is displayed
the first radio buttons is active, as if there were already
been chosen (black dot in the center), there is a way that it is not displayed
(the black point) until a radius button in the group is chosen.

This is my source code

Code: Select all | Expand


         oD02:ETNIAS := 0
         …….
         …….
         …….

         REDEFINE RADIO aGets01[011] VAR oD02:ETNIAS ID 115,116,117,118,119 OF oFld:aDialogs[01] UPDATE;
            MESSAGE "Etnia del sujeto"
 


Regards

Re: RADIO Button problem

Posted: Wed Jun 09, 2021 5:52 am
by ukoenig
Armando,

oD02:ETNIAS := 0 :(
…….
REDEFINE RADIO aGets01[011] VAR oD02:ETNIAS ID 115,116,117,118,119 OF oFld:aDialogs[01] UPDATE;
MESSAGE "Etnia del sujeto"

the startposition oD02:ETNIAS cannot be 0 :!:

in case You have a startposition of 0 and values like

0, 1, 2, 3, 4

nItem := oD02:ETNIAS + 1
REDEFINE RADIO aGets01[011] VAR nItem ID 115,116,117,118,119 OF oFld:aDialogs[01] UPDATE;
MESSAGE "Etnia del sujeto ;
ON CHANGE ( oD02:ETNIAS := nItem - 1 ) // a value-calculation related to the selected position

In some situations the normal radios are to small
For better viewing I created my own buttons like

( the new gradientpainter with a brightness slider color-adjustments )
Image

regards
Uwe

Re: RADIO Button problem

Posted: Wed Jun 09, 2021 2:20 pm
by Armando
Uwe:

Thanks a lot for you source code and advise.

Regards