Radio control

Radio control

Postby Otto » Mon Sep 14, 2009 9:16 am

I have definde a RADIO control this way:

Code: Select all  Expand view
 @ 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
Imageo
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6329
Joined: Fri Oct 07, 2005 7:07 pm

Re: Radio control

Postby Otto » 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
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6329
Joined: Fri Oct 07, 2005 7:07 pm

Re: Radio control

Postby Otto » Fri Sep 18, 2009 1:10 pm

Does someone have a solution?
Thanks in advance
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6329
Joined: Fri Oct 07, 2005 7:07 pm

Re: Radio control

Postby Marcelo Via Giglio » Fri Sep 18, 2009 4: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
Marcelo Via Giglio
 
Posts: 1064
Joined: Fri Oct 07, 2005 3:33 pm
Location: Cochabamba - Bolivia

Re: Radio control

Postby James Bott » Fri Sep 18, 2009 4: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
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: Radio control

Postby Otto » Fri Sep 18, 2009 5:06 pm

Hello james,
testrad3 is a sample with resource I use in this case the radio control from code.
Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6329
Joined: Fri Oct 07, 2005 7:07 pm

Re: Radio control

Postby Antonio Linares » Fri Sep 18, 2009 5: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: Select all  Expand view

   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
User avatar
Antonio Linares
Site Admin
 
Posts: 42081
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Radio control

Postby Otto » Fri Sep 18, 2009 6:44 pm

Hello Antonio,
thank you. As I use it on a panel I will wait for a fix.
Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6329
Joined: Fri Oct 07, 2005 7:07 pm

Re: Radio control

Postby James Bott » Fri Sep 18, 2009 9:02 pm

Otto,

Here is the syntax for a group using code:

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


James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: Radio control

Postby Otto » Fri Sep 18, 2009 9: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
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6329
Joined: Fri Oct 07, 2005 7:07 pm

Re: Radio control

Postby James Bott » Fri Sep 18, 2009 11:33 pm

Otto,

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

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: cmsoft and 67 guests