edutraini Posted February 22, 2017 Report Share Posted February 22, 2017 Pessoal boa tarde, Existe alguma forma de bloquear o cabecalho do listbox pois quando clica com o mouse ele some e depois volta Quote Link to comment Share on other sites More sharing options...
kapiaba Posted February 22, 2017 Report Share Posted February 22, 2017 Mostre o seu código, pois eu acho que é erro seu. Nunca passei por isso e se passei, passei... kkkkkkkkkkkk Veja: ON LEFT CLICK() Quote Link to comment Share on other sites More sharing options...
edutraini Posted February 22, 2017 Author Report Share Posted February 22, 2017 REDEFINE listbox oLbx FIELDS ; STR(PED->NROPEDIDO,10)+"-"+ped->tipoped,; DTOC(PED->DTPEDIDO),; STR(PED->CODCLI,6)+'-'+subs(ped->nomecli,1,40),; DTOC(PED->DTENTREGA), ; TRANS(PED->TOTPEDIDO,"999,999.99"),; TRANS(PED->DESCONTO,"999,999.99"),; (PED->STATUS),; PED->HORA,; STR(PED->VENDEDOR,3),; STR(PED->USUARIO,3),; iif(PED->RECEBIDO=.T.,hBitMap,hBitmap1),; PED->EMPRESA,; STR(PED->NRONOTA,6); HEADERS 'Nr.Ped','Dt.Emissao','Cliente','Dt.Entrega','Tot.Pedido','Desconto','St','Hora','Ven','Usu','Caixa','Loja','Nota' ; ID 58 ; ON DBLCLICK(MOSTRAMAD("ped")); SIZES 60,70,300,70,70,70,20,50,30,30,40,30,60; OF oDlg ; font Ft_Grid ; alias "ped" oLbx:aJustify:= {.t.,.f.,.f.,.f.,.t.,.t.,.f.,.f.,.t.,.t.,.f.,.f.,.f.} /* Justicar o texto na listbox */ oLbx:bKeyDown := {|nKey| iif(nKey=VK_RETURN,Mostramad(@cAlias10,olbx,nkey,nKey),Val_OKey(nKey))} oLbx :nClrForeFocus := {|nRow,nCol,nStyle| IF(PED->STATUS="C",CLR_VERMESC,IIF( PED->STATUS="L", CLR_VERDE,CLR_BRANCO) ) } oLbx :nClrPane := {|nRow,nCol,nStyle| IF(PED->STATUS="C",CLR_VERMESC,IIF( PED->STATUS="L", CLR_VERDE,CLR_BRANCO) ) } oLbx:nLineStyle :=vp_grade Quote Link to comment Share on other sites More sharing options...
kapiaba Posted February 22, 2017 Report Share Posted February 22, 2017 REQUEST OrdKeyNo, OrdKeyCount, OrdCreate, OrdKeyGoto FUNCTION... REDEFINE listbox oLbx FIELDS ; STR(PED->NROPEDIDO,10)+"-"+ped->tipoped,; DTOC(PED->DTPEDIDO),; STR(PED->CODCLI,6)+'-'+subs(ped->nomecli,1,40),; DTOC(PED->DTENTREGA), ; TRANS(PED->TOTPEDIDO,"999,999.99"),; TRANS(PED->DESCONTO,"999,999.99"),; (PED->STATUS),; PED->HORA,; STR(PED->VENDEDOR,3),; STR(PED->USUARIO,3),; iif(PED->RECEBIDO=.T.,hBitMap,hBitmap1),; PED->EMPRESA,; STR(PED->NRONOTA,6); HEADERS 'Nr.Ped','Dt.Emissao','Cliente','Dt.Entrega','Tot.Pedido','Desconto','St','Hora','Ven','Usu','Caixa','Loja','Nota' ; FIELDSIZES 60,70,300,70,70,70,20,50,30,30,40,30,60; ID 58 ; font Ft_Grid ; UPDATE ; OF oDlg ; ON DBLCLICK(MOSTRAMAD("ped")) /* ; alias "ped" */ oLbx:aJustify:= {.t.,.f.,.f.,.f.,.t.,.t.,.f.,.f.,.t.,.t.,.f.,.f.,.f.} /* Justicar o texto na listbox */ oLbx:bKeyDown := {|nKey| iif(nKey=VK_RETURN,Mostramad(@cAlias10,olbx,nkey,nKey),Val_OKey(nKey))} oLbx :nClrForeFocus := {|nRow,nCol,nStyle| IF(PED->STATUS="C",CLR_VERMESC,IIF( PED->STATUS="L", CLR_VERDE,CLR_BRANCO) ) } oLbx :nClrPane := {|nRow,nCol,nStyle| IF(PED->STATUS="C",CLR_VERMESC,IIF( PED->STATUS="L", CLR_VERDE,CLR_BRANCO) ) } oLbx:nLineStyle :=vp_grade /* //-----------------------------------------------------------------------// oLbx:nClrBackHead := CLR_LGREEN // Cor do Fundo do Cabe‡alho oLbx:nClrText := {|| nRGB( 165, 42, 42 ) } // Cor do Fundo do Cabe‡alho oLbx:nClrBackFocus := CLR_HRED // Cor do Cursor Em Cima do Ötem oLbx:nClrForeFocus := CLR_AMARELO // Cor da letra da barra ativa oLbx:nClrForeHead := CLR_HRED // Cor nos Headers - Cabe‡alhos // Cor no Pano de Fundo da Browse() Listbox-Legal - abaixo o comando oLbx:nClrPane := { || IIF( ( oLbx:cAlias )->( OrdKeyNo() ) %2 == 0, ; CLR_LGREEN, CLR_LGRAY ) } oLbx:nColAct := 2 // Onde o Cursor Vai Iniciar na coluna oLbx:nLineStyle := 3 // Estilo das linhas nos dados da Browse oLbx:lCellStyle := .T. // Somente pinta a c‚lula em que o cursor esta no momento // Justifica o Cabe‡alho: .F. = Esquerda .T. = Centro oLbx:aJustify := { .T., .F., .F., .F., .F., .F., .F., .F., .F., .F., .F., .F., .F., .F., .F., .F., .F. } oLbx:lMChange := .F. // Desabilita Mousemove - Movimentos do Mouse Congelam. // Barra vertical exacta... //oLbx:bLogicLen := { || ( DbClientes:cAlias )->( OrdCount() ) } oLbx:SetFocus() // Refocus on The Browse - Ativa o Foco na ListBox(Browse) oLbx:Refresh() // Estabiliza o Browse/Listbox - Refresca os Dados. // Pinta os Dados Novamente //-----------------------------------------------------------------------// */ Quote Link to comment Share on other sites More sharing options...
edutraini Posted February 23, 2017 Author Report Share Posted February 23, 2017 Obrigado, Kapi vou testar Quote Link to comment Share on other sites More sharing options...
augustogomes Posted March 1, 2017 Report Share Posted March 1, 2017 Eu também tenho este problemas e nunca consegui resolver. Esta opções para cores do cabeçalho não funcionam. Usei estas sugestões mas não deu certo. Quote Link to comment Share on other sites More sharing options...
kapiaba Posted March 1, 2017 Report Share Posted March 1, 2017 Mostre seu código e tente com: GetSysColor(). Quote Link to comment Share on other sites More sharing options...
kapiaba Posted March 1, 2017 Report Share Posted March 1, 2017 http://forums.fivetechsupport.com/viewtopic.php?f=6&t=9320&p=44627&hilit=nClrBackHead#p44627 Saida: TcBrowse ou xBrowse. abs. Quote Link to comment Share on other sites More sharing options...
augustogomes Posted March 1, 2017 Report Share Posted March 1, 2017 Obrigado Kapiaba Com relação as cores, se eu tirar o manifest, funciona. Mas sobre perder o cabeçalho, não consegui resolver. A listbox e montada mas conforme o uso, o cabeçalho some. Isto não acontece com xbrowse. abaixo um exemplo da chamda da listbox REDEFINE LISTBOX oBrwPesq ; FIELDS (olDbf)->&(clCamp1),(olDbf)->&(clCamp2); HEADERS (clCab1),(clCab2); ID 4003 ; UPDATE; OF oDlgPesq ; ON DBLCLICK (nlRecno := (olDbf)->( Recno() ), llValRet:= .T., oDlgPesq:End()) oBrwPesq:aActions:={ {|| I_TrocaProcura(1,oBrwPesq,(olDbf),clCab1,clOrder1,clCamp1) },; {|| I_TrocaProcura(1,oBrwPesq,(olDbf),clCab2,clOrder2,SUBS(clCamp2,1,6)) }} oBrwPesq:nClrBackHead := nRGB( 190, 200, 255 ) oBrwPesq:bKeyDown:={|nKeyBus| IF(nKeyBus == VK_RETURN,(nlRecno := (olDbf)->( Recno() ), llValRet:= .T., oDlgPesq:End()),I_TeclaBrw( nKeyBus )) } oBrwPesq:lMChange := .F. Quote Link to comment Share on other sites More sharing options...
kapiaba Posted March 2, 2017 Report Share Posted March 2, 2017 Poste o .RC dela. 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.