Manuel Mercado - Obter a coluna atual TSBROWSE

Post Reply
MGA
Posts: 1219
Joined: Mon Feb 25, 2008 2:54 pm
Location: Brasil/PR/Maringá
Contact:

Manuel Mercado - Obter a coluna atual TSBROWSE

Post by MGA »

Maestro, tenho em um BROWSE cerca de 30 colunas

REDEFINE BROWSE oBrw CELLED ALIAS "SAIPRO" ID 46 OF oDlg

....
....

//coluna 17
ADD COLUMN TO oBrw TITLE "ST" DATA FieldWBlock("subtri",select()) SIZE 30 EDITABLE 3DLOOK FALSE, TRUE, TRUE ALIGN DT_CENTER, DT_CENTER, DT_CENTER PICTURE "!";
COLORS CLR_BLACK, bColor MOVE DT_MOVE_NEXT;
VALID {|uVar| TSvalidaSub803(uVar,obrw,cTrabProdSub)};
WHEN IF(!EMPTY(saipro->codpro),.T.,.F.)



***************************************************
static function TSvalidaSub803(ubuffer,obrw,cTrabProdSub)
***************************************************
? obrw:ncolposr() //me retorna 2 mais estou na 17
RETURN(.T.)


Image

Maestro, não estou conseguindo o numero da coluna real em que estou, como posso resolver?


Muito obrigado!
ubiratanmga@gmail.com

FWH17.04
FWPPC
Harbour/xHarbour
xMate
Pelles´C
TDolphin
User avatar
mmercado
Posts: 782
Joined: Wed Dec 19, 2007 7:50 am
Location: Salamanca, Gto., México

Re: Manuel Mercado - Obter a coluna atual TSBROWSE

Post by mmercado »

Hola José:
SGS wrote: ? obrw:ncolposr() //me retorna 2 mais estou na 17
oBrw:nColPos te devuelve la posición relativa dentro de las columnas visibles, para lo que tú necesitas usa:
?oBrw:nCell

Saludos

Manuel Mercado
MGA
Posts: 1219
Joined: Mon Feb 25, 2008 2:54 pm
Location: Brasil/PR/Maringá
Contact:

Post by MGA »

grato Maestro!
ubiratanmga@gmail.com

FWH17.04
FWPPC
Harbour/xHarbour
xMate
Pelles´C
TDolphin
MGA
Posts: 1219
Joined: Mon Feb 25, 2008 2:54 pm
Location: Brasil/PR/Maringá
Contact:

Post by MGA »

Obrigado Maestro!
ubiratanmga@gmail.com

FWH17.04
FWPPC
Harbour/xHarbour
xMate
Pelles´C
TDolphin
Post Reply