Cómo hago para que el radio me salga en forma horizontal
- Code: Select all Expand view
@4.5,150 RADIO oRad VAR nAI ITEMS "Activos","Inactivos" SIZE 50, 10 PIXEL OF oDlg ON CHANGE Cambia()
Gracias por la ayuda
@4.5,150 RADIO oRad VAR nAI ITEMS "Activos","Inactivos" SIZE 50, 10 PIXEL OF oDlg ON CHANGE Cambia()
acuellar wrote:José Luis
Sale así:
Activos
Inactivos
Yo quiero así:
Activos Inactivos
#include "FiveWin.ch"
function main()
local oDlg, oRad, nValue := 1
local oGet1
local lSave := .f.
local ctestget
if !file("test1.dbf")
createfilea()
endif
if (Select("test1") == 0)
use test1 new
index on field -> msg1 to temp
else
select Select("test1")
endif
Append Blank
onerror("APPEND")
Replace field -> msg1 With "This is Radio 1"
Replace field -> msg2 With "This is Radio 2"
Replace field -> msg3 With "This is Radio 3"
if nValue = 1
ctestget = field -> msg1
elseif nValue = 2
ctestget = field -> msg2
else
ctestget = field -> msg3
endif
DEFINE DIALOG oDlg FROM 0, 0 TO 26, 79 ;
TITLE "Test radio orizontal - FWHX16.10"
@ 0.2, 2 RADIO oRad VAR nValue ITEMS "Radio 1" OF oDlg SIZE 40, 10 ;
ON CHANGE { || radiobtntest(oRad:nOption, oGet1, @ctestget) } UPDATE
@ 0.2, 17 RADIOITEM "Radio 2" RADIOMENU oRad OF oDlg SIZE 40, 10;
UPDATE
@ 0.2, 32 RADIOITEM "Radio 3" RADIOMENU oRad OF oDlg SIZE 40, 10;
UPDATE
@ 6, 1 get oGet1 VAR ctestget size 100, 11
@ 9.95, 18.7 BUTTON "&Accept" OF oDlg ACTION (lSave := .t.) ;
SIZE 40, 12
@ 9.95, 25.7 BUTTON "&Exit" OF oDlg ACTION (oDlg:End()) SIZE 40, 12
ACTIVATE DIALOG oDlg CENTERED
if lSave
select test1
onerror("RLOCK")
if nValue = 1
replace field -> msg1 with ctestget
elseif nValue = 2
replace field -> msg2 with ctestget
else
replace field -> msg3 with ctestget
endif
endif
close databases
return nil
*******************************************
function radiobtntest(nValue, oGet1, ctestget)
if nValue = 1
ctestget = field -> msg1
elseif nValue = 2
ctestget = field -> msg2
else
ctestget = field -> msg3
endif
oGet1:ReFresh()
return nil
********************************************
function createfilea()
// "File : test1.dbf"
local tmpdbf:= {}
AAdd(tmpdbf, {"msg1", "c", 50, 0})
AAdd(tmpdbf, {"msg2", "c", 50, 0})
AAdd(tmpdbf, {"msg3", "c", 50, 0})
dbcreate("test1.dbf", tmpdbf)
close
return nil
*******************************************
function ONERROR
parameters errortype
errortype:= Upper(errortype)
do case
case errortype == "RLOCK"
if (RLock())
return .T.
endif
do while (!RLock())
InKey(3)
enddo
case errortype == "APPEND"
if (!neterr())
onerror("RLOCK")
return .T.
endif
do while (neterr())
InKey(3)
append blank
enddo
onerror("RLOCK")
endcase
return .T.
********************************
@16,150 RADIO oRad VAR nAI ITEMS "Activos" SIZE 30, 8 PIXEL OF oDlg ON CHANGE (Cambia(),oBrw:Setfocus(),oBrw:Refresh())
@16,200 RADIOITEM "Inactivos" RADIOMENU oRad OF oDlg PIXEL SIZE 30,8
Return to FiveWin para Harbour/xHarbour
Users browsing this forum: No registered users and 20 guests