MAMP2 Posted June 5, 2019 Report Share Posted June 5, 2019 Ola pessoal alguem sabe como fazer para uma listbox eu possa colocar uma linha em especifica de outra cor ou com destaque especial (tipo letras vemelhar) em uma listbox um determinado registo que estivesse com um flag = 1 ficasse vemelho ou azul ou qualquer tipo de destaque que mostre que aquela linha tem que ter uma atencao especial Quote Link to comment Share on other sites More sharing options...
cendon Posted June 5, 2019 Report Share Posted June 5, 2019 REDEFINE LISTBOX oValue VAR cValue FIELDS "","","","","","","","","","",""; HEADER "" ID 314 ; ON CHANGE ( "" ) ; ON DBLCLICK ( alterapg(aItems[oValue:nAt][1]),oValue:refresh() ) ; OF oFld1:aDialogs[2]; oValue:SetArray( aItems ) oValue:aHeaders := { "Mes Ref.","Dt.Venc.","Dt.Rec.","Valor Cob","Status","Ocor.","Pg.Comi","Valor Cor","Val.Comi","Condicao" } oValue:aColSizes := { 60, 70, 70, 60, 40, 30, 50, 60, 60, 60 } oValue:bLine := { || {aItems[oValue:nAt][1],aItems[oValue:nAt][2],aItems[oValue:nAt][3],aItems[oValue:nAt][4],aItems[oValue:nAt][5],aItems[oValue:nAt][6],aItems[oValue:nAt][7],aItems[oValue:nAt][8],aItems[oValue:nAt][9],aItems[oValue:nAt][10] } } oValue:nLineStyle := 0 oValue:nClrForeHead := RGB( 0, 0, 255 ) // Cor nos Headers - Cabe‡alhos oValue:nClrText := {|| iif(aItems[oValue:nAt][6]#"00", CLR_HRED,CLR_BLACK) } // cor da linha se condição aItems 6 = "00" oValue:nclrpane:={||iif(oValue:nAt % 2 <> 0, nrgb(230,230,230), nrgb( 190, 215, 190))} // Cor do fundo se par uma se impar outra Quote Link to comment Share on other sites More sharing options...
kapiaba Posted June 6, 2019 Report Share Posted June 6, 2019 oLbx:nClrPane := { || IIF( EsEntrada,CLR_HRED,CLR_WHITE ) } //-> Veja se ajuda: REDEFINE LISTBOX oLbx FIELDS ""; ALIAS "AUDITOR" ID 100 OF oDlg oLbx:Set3DStyle() oLbx:lHScroll := .F. oLbx:bLine := {|| { AUDITOR->USUARIO, AUDITOR->NIVEL, ; CVALTOCHAR(AUDITOR->FECHA), AUDITOR->HORA, AUDITOR->ACCION} } oLbx:aHeaders := { "Usuario","Privilegio","Fecha","Hora","Acción Realizada" } oLbx:aHJustify := {2,2,2,2,2} //-> Mudar a cor oLbx:nClrPane := {|| IIF( (oLbx:cAlias)->(OrdKeyNo())%2=0, ; nRGB(255,255,255), ColorDia(AUDITOR->FECHA) ) } oLbx:lAdjLastCol := .T. oLbx:lAdjBrowse := .T. //--------------------------------------------------------------------------// STATIC FUNCTION ColorDia(dDate) LOCAL cRGBColor:= "" LOCAL nDia:= 0 nDia:= STRZERO(DAY(dDate),2) IF nDia == "01" cRGBColor:= nRGB(255,253,196) ELSEIF nDia == "02" cRGBColor:= nRGB(208,202,183) ELSEIF nDia == "03" cRGBColor:= nRGB(222,235,255) ELSEIF nDia == "04" cRGBColor:= nRGB(206,255,196) ELSEIF nDia == "05" cRGBColor:= nRGB(255,235,206) ELSEIF nDia == "06" cRGBColor:= nRGB(194,230,253) ELSEIF nDia == "07" cRGBColor:= nRGB(255,238,255) ELSEIF nDia == "08" cRGBColor:= nRGB(173,207,247) ELSEIF nDia == "09" cRGBColor:= nRGB(228,222,203) ELSEIF nDia == "10" cRGBColor:= nRGB(180,222,185) ELSEIF nDia == "11" cRGBColor:= nRGB(217,228,255) ELSEIF nDia == "12" cRGBColor:= nRGB(202,255,239) ELSEIF nDia == "13" cRGBColor:= nRGB(255,226,204) ELSEIF nDia == "14" cRGBColor:= nRGB(246,220,255) ELSEIF nDia == "15" cRGBColor:= nRGB(226,255,216) ELSEIF nDia == "16" cRGBColor:= nRGB(250,222,237) ELSEIF nDia == "17" cRGBColor:= nRGB(251,255,224) ELSEIF nDia == "18" cRGBColor:= nRGB(234,255,211) ELSEIF nDia == "19" cRGBColor:= nRGB(255,210,211) ELSEIF nDia == "20" cRGBColor:= nRGB(255,240,255) ELSEIF nDia == "21" cRGBColor:= nRGB(217,222,180) ELSEIF nDia == "22" cRGBColor:= nRGB(254,255,231) ELSEIF nDia == "23" cRGBColor:= nRGB(231,255,204) ELSEIF nDia == "24" cRGBColor:= nRGB(211,235,184) ELSEIF nDia == "25" cRGBColor:= nRGB(255,246,224) ELSEIF nDia == "26" cRGBColor:= nRGB(255,230,231) ELSEIF nDia == "27" cRGBColor:= nRGB(239,235,222) ELSEIF nDia == "28" cRGBColor:= nRGB(255,233,176) ELSEIF nDia == "29" cRGBColor:= nRGB(231,239,222) ELSEIF nDia == "30" cRGBColor:= nRGB(255,255,213) ELSEIF nDia == "31" cRGBColor:= nRGB(248,242,223) ENDIF RETURN( cRGBColor ) // ou // :bClrStd:=ClrStd() //----------------------- STATIC FUNCTION ClrStd() //----------------------- LOCAL aCol:={} IF alias->(ordkeyno()) % 2 == 0 aCol:={CLR_BLACK, RGB(193,221,255) } ELSE aCol:={CLR_BLACK, RGB(221,245,255) } ENDIF RETURN( aCol ) Quote Link to comment Share on other sites More sharing options...
SISCO Posted July 22, 2019 Report Share Posted July 22, 2019 Bom dia pessoal Fiz um teste nesta rotina,mas não reconheceu oLbx:Set3DStyle(). A minha versão do Fivewin é 16.08 Quote Link to comment Share on other sites More sharing options...
kapiaba Posted July 22, 2019 Report Share Posted July 22, 2019 Retire. https://wiki.fivetechsoft.com/doku.php?id=fivewin_class_twbrowse Quote Link to comment Share on other sites More sharing options...
kapiaba Posted July 22, 2019 Report Share Posted July 22, 2019 http://forums.fivetechsupport.com/viewtopic.php?t=8275 Quote Link to comment Share on other sites More sharing options...
kapiaba Posted July 22, 2019 Report Share Posted July 22, 2019 Isto não é nativo da classe WBROWSE.PRG, é da classe do HERNAN. LOCAL l3d := .F. If Alert( "Quiere verlo en 3D ??", { "Aceptar","Cancelar" }) == 1 l3D := .T. EndIf If l3D oLbx:Set3DStyle() EndIf Quote Link to comment Share on other sites More sharing options...
SISCO Posted July 22, 2019 Report Share Posted July 22, 2019 Funcionou Kap Obrigado REDEFINE LISTBOX oLbxCodBar ; FIELDS "" ,"" ; HEADERS "Código","Und" ; FIELDSIZES 80 , 15 ; ID 8000 OF oFld:aDialogs[1] oLbxCodBar:SetArray( aItens ) oLbxCodBar:bLine := { || { aItens[oLbxCodBar:nAt,1] , aItens[oLbxCodBar:nAt,2] } } oLbxCodBar:nLineStyle := 3 oLbxCodBar:aJustify := {.F.,.F.} oLbxCodBar:lAutoEdit = .T. oLbxCodBar:Refresh() 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.