FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Radio button.
Posts: 723
Joined: Tue Sep 04, 2007 08:45 AM
Radio button.
Posted: Sun Nov 24, 2013 07:33 AM

Guys:

Is there a way to display a RADIO button in 2 set of columns instead of just one ? Thank you.

Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
Re: Radio button.
Posted: Sun Nov 24, 2013 08:17 AM

Yes, you can put each single Radio items anywhere you want in the dialog.

EMG

Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: Radio button.
Posted: Sun Nov 24, 2013 12:39 PM
Gustavo,



You can add these lines to my given dialog-sample :
viewtopic.php?f=3&t=27704&p=154703#p154703

Code (fw): Select all Collapse
FUNCTION SHOW_DLG()
LOCAL oBtn3, nBTop, nBLeft, oRad1, nValue1 := 1, oRad2, nValue2 := 3
LOCALoRad3, nValue3 := 3, oRad4, nValue4 := 1

GET_INI()

...
...
...

@ 20, 20 RADIO oRad1 VAR nValue1 ITEMS "Item 1" OF oDlg SIZE 38, 10 PIXEL ;
ON CHANGE { || MsgAlert( "Horizontal direction" + CRLF + "1. Group", "Attention" ) } UPDATE 
@ 20, 60 RADIOITEM "Item 2" RADIOMENU oRad1 OF oDlg SIZE 36, 10 PIXEL UPDATE 
@ 20, 100 RADIOITEM "Item 3" RADIOMENU oRad1 OF oDlg SIZE 36, 10 PIXEL UPDATE 
@ 20, 140 RADIOITEM "Item 4" RADIOMENU oRad1 OF oDlg SIZE 36, 10 PIXEL UPDATE 

AEval( oRad1:aItems, { | oRad | oRad:lTransparent := .T., ;
                          oRad:SetFont ( oFont ), ;
                                              oRad:nClrText := 255 } )

@ 40, 20 RADIO oRad2 VAR nValue2 ITEMS "Item 1" OF oDlg SIZE 38, 10 PIXEL ;
ON CHANGE { || MsgAlert( "Horizontal direction" + CRLF + "2. Group", "Attention" ) } UPDATE 
@ 40, 60 RADIOITEM "Item 2" RADIOMENU oRad2 OF oDlg SIZE 36, 10 PIXEL UPDATE 
@ 40, 100 RADIOITEM "Item 3" RADIOMENU oRad2 OF oDlg SIZE 36, 10 PIXEL UPDATE 
@ 40, 140 RADIOITEM "Item 4" RADIOMENU oRad2 OF oDlg SIZE 36, 10 PIXEL UPDATE 

AEval( oRad2:aItems, { | oRad | oRad:lTransparent := .T., ;
                          oRad:SetFont ( oFont ), ;
                                              oRad:nClrText := 65535 } )

@ 60, 20 RADIO oRad3 VAR nValue3 ITEMS "Item 1" OF oDlg SIZE 38, 10 PIXEL ;
ON CHANGE { || MsgAlert( "Horizontal direction" + CRLF + "3. Group", "Attention" ) } UPDATE 
@ 70, 60 RADIOITEM "Item 2" RADIOMENU oRad3 OF oDlg SIZE 36, 10 PIXEL UPDATE 
@ 80, 100 RADIOITEM "Item 3" RADIOMENU oRad3 OF oDlg SIZE 36, 10 PIXEL UPDATE 
@ 90, 140 RADIOITEM "Item 4" RADIOMENU oRad3 OF oDlg SIZE 36, 10 PIXEL UPDATE 

AEval( oRad3:aItems, { | oRad | oRad:lTransparent := .T., ;
                          oRad:SetFont ( oFont ), ;
                                              oRad:nClrText := 16777162 } )

@ 110, 20 RADIO oRad4 VAR nValue4 ITEMS "Item 1" OF oDlg SIZE 38, 10 PIXEL ;
ON CHANGE { || MsgAlert( "Horizontal direction" + CRLF + "3. Group", "Attention" ) } UPDATE 
@ 120, 20 RADIOITEM "Item 2" RADIOMENU oRad4 OF oDlg SIZE 36, 10 PIXEL UPDATE 
@ 110, 60 RADIOITEM "Item 3" RADIOMENU oRad4 OF oDlg SIZE 36, 10 PIXEL UPDATE 
@ 120, 60 RADIOITEM "Item 4" RADIOMENU oRad4 OF oDlg SIZE 36, 10 PIXEL UPDATE 

AEval( oRad4:aItems, { | oRad | oRad:lTransparent := .T., ;
                          oRad:SetFont ( oFont ), ;
                                              oRad:nClrText := 12189625 } )

ACTIVATE DIALOG oDlg ;
ON INIT  ( WD_BACKGRD( oDlg, c_Path2, 4, , , , , , "Image1.jpg" ), ; 
                                                nBTop := oDlg:nHeight - 130 , ;
                                                nBLeft := oDlg:nWidth - 140, ;
                                                oBtn3:Move( nBTop, nBLeft, , , .f. ) )

SAVE_INI()

RETURN NIL


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.

Continue the discussion