Clipper On Line • Ver Tópico - ON HEADCLICK
Mudar para estilo Clássico
Discussão sobre a biblioteca Fivewin - O Clipper para Windows.
Postar uma resposta

ON HEADCLICK

06 Fev 2015 09:12

Alguem poderia me dizer qual a estrutura do ON HEADCLICK ?
estou tentando fazer um teste,mas da sempre erro no {

segue o codigo para melhor entendimento

Código:
REDEFINE XBROWSE ::xBrw2 ID 4003 OF ::oDlg CELL LINES;
  FIELDS 39->DIRETORIO, IF(39->SN == "S", .T., .F.), 39->EMPRESA, 39->CGC;
  HEADERS "Pasta", "S/N", "Empresa", "C.N.P.J.";
  ON DBLCLICK ::c4change() ;
  ON HEADCLICK msginfo("oi")

ON HEADCLICK

07 Fev 2015 08:03

Daiane,
ON HEADCLICK não está definido no "xbrowse.ch" por isso o erro.
T+
Euclides

ON HEADCLICK

09 Fev 2015 09:46

E não teria uma forma de poder clicar no cabeçalho e ter algum retorno?

ON HEADCLICK

09 Fev 2015 13:45

Na classe do xBrowse.prg:

Código:
   DATA bLClickHeader,; // codeblock to be evaluated when left clicking on the header
        bRClickHeader,; // codeblock to be evaluated when right clicking on the header
        bLClickFooter,; // codeblock to be evaluated when left clicking on the footer
        bRClickFooter,; // codeblock to be evaluated when right clicking on the footer
        bLDClickData,;  // codeblock to be evaluated when left double clicking on the data
        bRClickData     // codeblock to be evaluated when right clicking on the data


Abs

ON HEADCLICK

09 Fev 2015 17:53

É eu ja tinha visto o "bLClickHeader"
Alguem sabe me dizer a estrutura dele?

ON HEADCLICK

10 Fev 2015 12:38

Daiane,
É mais ou menos isso:
Código:
FOR N:=1 TO LEN(oBrw:aCols)
oBrw:aCols[n]:bLClickHeader := {|nRow, nCol, nFlags, oObj| msginfo(oObj:cHeader) }
NEXT

oBrw é o objeto xBrowse
nRow e nCol, são autoexplicativos
oObj é o objeto da Coluna
nFlags - não sei como usar...
Qualquer coisa... avise.
Euclides
Postar uma resposta