FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Radio control
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Radio control
Posted: Mon Sep 14, 2009 09:16 AM
I have definde a RADIO control this way:

Code (fw): Select all Collapse
  @ 140, 50 RADIO oRadio1 VAR nOption ITEMS "Hotel ", "Kassen ", "Gesamt" OF oPanel PIXEL  SIZE 80, 13


Navigating from control to control the TAB key navigates to every item.
Is this correct? I thought within the radio control you go up and down with the cursor-key?
Do I have to define somewhare a group?

Thanks in advance
Ott
o
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: Radio control
Posted: Mon Sep 14, 2009 10:15 AM
Testrad2.prg of the FW samples has the same behavior.
It is impossible to operate this dialog only with the keyboard.
Best regards,
Otto
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: Radio control
Posted: Fri Sep 18, 2009 01:10 PM

Does someone have a solution?
Thanks in advance
Otto

Posts: 1088
Joined: Fri Oct 07, 2005 03:33 PM
Re: Radio control
Posted: Fri Sep 18, 2009 04:07 PM

Otto,

you can use CHECKBOX instead of RADIO control, you need to suimulate the radio's behavior with ON CHANGE option.

this is an idea only

regards

Marcelo

Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: Radio control
Posted: Fri Sep 18, 2009 04:15 PM

Otto,

You need to define a group for the Tab to work as you want. See \samples\testrad3.prg.

Even as just an infarce design issue you should define the radios as a group.

Regards,
James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: Radio control
Posted: Fri Sep 18, 2009 05:06 PM

Hello james,
testrad3 is a sample with resource I use in this case the radio control from code.
Best regards,
Otto

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Radio control
Posted: Fri Sep 18, 2009 05:55 PM
Otto,

samples\TestRad2.prg behaves that (wrong) way, because it uses a window, and in a window FWH controls the navigation between controls and it is failing on radios. We have to fix it.

If you change "WINDOW" into "DIALOG" in samples\TestRad2.prg and also changes the dialog size, then you will see that it behaves as expected:
Code (fw): Select all Collapse
   DEFINE DIALOG oWnd ;
      TITLE "Testing a Radio Buttons Menu" COLOR "N/W"

   ...

   ACTIVATE DIALOG oWnd CENTERED ;
      ON INIT oWnd:SetSize( 600, 400 )
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: Radio control
Posted: Fri Sep 18, 2009 06:44 PM
Hello Antonio,
thank you. As I use it on a panel I will wait for a fix.
Best regards,
Otto
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: Radio control
Posted: Fri Sep 18, 2009 09:02 PM
Otto,

Here is the syntax for a group using code:

Code (fw): Select all Collapse
@ <nTop> . <nLeft> [ GROUP <oGroup> ] TO <nBottom>, <nRight> ;
[ LABEL | PROMPT <cLabel> ];
[ COLOR <cClrFore> [, <nClrBack> ] ];
[ PIXEL ];
[ DESIGN ]


James
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: Radio control
Posted: Fri Sep 18, 2009 09:27 PM

Hello James,
For this part I need radios on a panel and as Antonio writes above there are problems with windows.
It seems radios and TAB navigation only works with dialogs.
Best regards,
Otto

Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: Radio control
Posted: Fri Sep 18, 2009 11:33 PM

Otto,

You can put a borderless dialog on the panel and the controls on the dialog.

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10

Continue the discussion