FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Modify Radio to fill more than one option
Posts: 389
Joined: Mon Oct 13, 2008 11:26 AM
Modify Radio to fill more than one option
Posted: Tue Apr 13, 2010 01:27 PM

Hi, I want to change my radio class to work that way

Ex:
Normal radio:
โ—‹โ—โ—‹โ—‹โ—‹
Wanted radio:
โ—โ—โ—‹โ—‹โ—‹

Ex2:
Normal radio:
โ—‹โ—‹โ—โ—‹โ—‹
Wanted radio:
โ—โ—โ—โ—‹โ—‹

Every option at left will be filled.

How can I do it?

Email: SamirSSabreu@gmail.com
xHarbour 1.2.3 + Fwhh 20.2
Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
Re: Modify Radio to fill more than one option
Posted: Tue Apr 13, 2010 02:41 PM

Why don't you use checkboxes in stead ?

Regards,

Michel D.
Genk (Belgium)


_____________________________________________________________________________________________

I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Posts: 389
Joined: Mon Oct 13, 2008 11:26 AM
Re: Modify Radio to fill more than one option
Posted: Tue Apr 13, 2010 04:55 PM

Because Radio just need to change the cosmetic...

With checkbox I will have to use +- 400 objects and with radio i will have to use +- 60

I will use about:
19 radios with 10 option's = 190 checkbox
40 radios with 5 option's = 200 checkbox
01 radio with 12 option's = 012 checkbox

Email: SamirSSabreu@gmail.com
xHarbour 1.2.3 + Fwhh 20.2
Posts: 1088
Joined: Fri Oct 07, 2005 03:33 PM
Re: Modify Radio to fill more than one option
Posted: Tue Apr 13, 2010 07:27 PM

Hola,

and the modified radios will return? ..... an array? a binary number composition?

regards

Marcelo

Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: Modify Radio to fill more than one option
Posted: Tue Apr 13, 2010 10:47 PM

I am curious about what type of applicaton requires 400 checkboxes (or 400 radios)?

I sure wouldn't want to be a user of such an application--that is a lot of work. I think my mouse finger would fall off ;-)

Regards,
James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 389
Joined: Mon Oct 13, 2008 11:26 AM
Re: Modify Radio to fill more than one option
Posted: Wed Apr 14, 2010 11:38 AM
Marcelo Via Giglio wrote:Hola,

and the modified radios will return? ..... an array? a binary number composition?

regards

Marcelo



Exact like the radio, a number. In the case, the number of the filled options.


Ex:
Normal radio:
โ—‹โ—โ—‹โ—‹โ—‹ = 2
Wanted radio:
โ—โ—โ—‹โ—‹โ—‹ =2

James Bott wrote:I am curious about what type of applicaton requires 400 checkboxes (or 400 radios)?

I sure wouldn't want to be a user of such an application--that is a lot of work. I think my mouse finger would fall off :-)

Regards,
James


It's a opnion poll with notes from 1 to 5 or 1 to 10 in some questions, so the user just only to click in the note wanted.

Like I said, with checkbox I will need 400! with radion will be +- 60...

And the only thing that the user will have to do is choose where to click... It's much easier than choose in a combo...
Email: SamirSSabreu@gmail.com
xHarbour 1.2.3 + Fwhh 20.2
Posts: 1088
Joined: Fri Oct 07, 2005 03:33 PM
Re: Modify Radio to fill more than one option
Posted: Wed Apr 14, 2010 12:52 PM
Hello,

Ex:
Normal radio:
โ—‹โ—โ—‹โ—‹โ—‹ = 2
Wanted radio:
โ—โ—โ—‹โ—‹โ—‹ =2


this isn't clear for me, but this is not the problem, maybe yo can simulate a option poll with xBrowse, I think, you only use 1 control in this case, and would be more flexible, one row for one question and the columns for the options

Regards

Marcelo
Posts: 389
Joined: Mon Oct 13, 2008 11:26 AM
Re: Modify Radio to fill more than one option
Posted: Wed Apr 14, 2010 01:44 PM
Marcelo Via Giglio wrote:Hello,

Ex:
Normal radio:
โ—‹โ—โ—‹โ—‹โ—‹ = 2
Wanted radio:
โ—โ—โ—‹โ—‹โ—‹ =2


this isn't clear for me, but this is not the problem, maybe yo can simulate a option poll with xBrowse, I think, you only use 1 control in this case, and would be more flexible, one row for one question and the columns for the options

Regards

Marcelo



Redefine Radio oRdImp;
Var nTipImp;
ID 101,102,103; // 101 - By date
Update; // 102 - By client
of oDlgImp // 103 - General

Whe you use the radio the "Var" is numeric, if you choose the second option the number will be 2, the third will be 3, etc...

I don't need to change this, just the cosmetic, if I choose the second option the first and the second will be filled not only the second...

If I can control the state of one individual option of the radio I can do it manually.

Ex.:
//-- Fill the 1st and 2nd option
oRdImp:aOptions[1] := .T.
oRdImp:aOptions[2] := .T.
oRdImp:aOptions[3] := .F.
oRdImp:aOptions[4] := .F.
oRdImp:aOptions[5] := .F.

//-- Fill the 1st to 3rd option
oRdImp:aOptions[1] := .T.
oRdImp:aOptions[2] := .T.
oRdImp:aOptions[3] := .T.
oRdImp:aOptions[4] := .F.
oRdImp:aOptions[5] := .F.

If I don't have how to change this I'll create a class to simulate it with checkbox, but for simulate it, how I can change the checkbox (usally a square) to a circle ?
Email: SamirSSabreu@gmail.com
xHarbour 1.2.3 + Fwhh 20.2
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: Modify Radio to fill more than one option
Posted: Wed Apr 14, 2010 04:21 PM
Another possible Solution using Buttons :
A Buttonclick changes the Colors of the Buttons from Left to selected Position.



Best Regards
Uwe :-)
Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.
Posts: 389
Joined: Mon Oct 13, 2008 11:26 AM
Re: Modify Radio to fill more than one option
Posted: Wed Apr 14, 2010 07:12 PM
ukoenig wrote:Another possible Solution using Buttons :
A Buttonclick changes the Colors of the Buttons from Left to selected Position.



Best Regards
Uwe :-)


Yes, it can help, but to do this I'll have to create a class....
Email: SamirSSabreu@gmail.com
xHarbour 1.2.3 + Fwhh 20.2
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: Modify Radio to fill more than one option
Posted: Wed Apr 14, 2010 08:35 PM
It is easy and no extra Class needed.
I will create a complete sample.
I need to know : how many Rows and how many Actions per Row You need.
Do You want to start all Actions defined from Left to pressed Position ?
Sample : 1 2 3 4 5 => Pressed 4 starts Actions for 1 2 3 4 and colors 1 2 3 4 ???



Best regards
Uwe :-)
Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.
Posts: 389
Joined: Mon Oct 13, 2008 11:26 AM
Re: Modify Radio to fill more than one option
Posted: Thu Apr 15, 2010 04:19 AM

Ex.
If I click on the second
Normal radio:
โ—‹โ—โ—‹โ—‹โ—‹ = 2
Wanted radio:
โ—โ—โ—‹โ—‹โ—‹ =2

The options at left will be filled. Dont need to run anything, just change the var with the option selected...

Email: SamirSSabreu@gmail.com
xHarbour 1.2.3 + Fwhh 20.2
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: Modify Radio to fill more than one option
Posted: Thu Apr 15, 2010 08:06 AM
The complete Source ( prg, resource, buttons, make-file ...)




Download ( 1.6 MB ) :
http://www.pflegeplus.com/fw_downloads/radios.zip

Best Regards
Uwe :-)
Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.
Posts: 363
Joined: Wed Feb 15, 2006 02:06 PM
Re: Modify Radio to fill more than one option
Posted: Thu Apr 15, 2010 10:14 AM

Uwe,

That looks neat - well done!!

Pete

Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: Modify Radio to fill more than one option
Posted: Sun Apr 18, 2010 09:21 PM

If you want to use radios like this, then I think your only choice is to create a new subclass of TRadio that works the way you want.

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10