jfaguiar Posted May 11, 2023 Report Share Posted May 11, 2023 Boa tarde pessoal. É possível exibir as opções de um RADIO na horizontal ao invés da forma padrão que é vertical? Muito obrigado. Quote Link to comment Share on other sites More sharing options...
Jmsilva Posted May 12, 2023 Report Share Posted May 12, 2023 Faço assim: DEFINE DIALOG oDlg SIZE 360,180 PIXEL TITLE "Radio Vertical/Horizontal" @ 04,10 RADIO nNivel PIXEL PROMPT "&Teste 1", "&Teste 2" OF oDlg @ 04,50 RADIO oRad Var nNivel PIXEL PROMPT "&Teste 3", "teste 4" OF oDlg @ 6, 19 BUTTON "&Cancel" OF oDlg SIZE 50, 12 ACTION oDlg:End() ACTIVATE DIALOG oDlg CENTERED; ON INIT oRad:aItems[2]:Move(8,200,,,.T.) // @ 04 (2*4=8) dobro da linha Quote Link to comment Share on other sites More sharing options...
kapiaba Posted May 12, 2023 Report Share Posted May 12, 2023 Com WORKSHOP.exe the best, eu faço como eu quiser. Abs. Regards, saludos. Quote Link to comment Share on other sites More sharing options...
Jmsilva Posted May 12, 2023 Report Share Posted May 12, 2023 5 minutos atrás, kapiaba disse: Com WORKSHOP.exe the best, eu faço como eu quiser. Abs. Regards, saludos. Sim. Assim como qq outro editor de recursos, porém, entendi que a dúvida paira sobre codificação sem o uso de recursos. Quote Link to comment Share on other sites More sharing options...
kapiaba Posted May 12, 2023 Report Share Posted May 12, 2023 Em @SAY também faço.... kkkkkkkkkkkkkk E fica perfeito, mira ahi. Me diz que tú "fais" milhor JmSilva!!! kkkkkkkkkk // https://forums.fivetechsupport.com/viewtopic.php?f=6&t=33306&p=196282&hilit=radio+horizontal&sid=dd5f866f48975669f27c71cabcc27441#p196282 // C:\FWH..\SAMPLES\RADHORIZ.PRG - Author: Eu mesmo, nem lembrava... kkkkkkk #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 Horizontal - 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. ******************************** Regards, saludos. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.