Page 1 of 1
xbrowse y setcheck Mr Rao please
Posted: Tue Mar 31, 2020 11:45 pm
by wilsongamboa
Code: Select all
#include "fivewin.ch"
function Main()
local oCn, oRs, oDlg, oBrw
oCn := FW_DemoDB() //FW_OpenAdoConnection( aCredentials, .T. )
oRs := oCn:RowSet( "SELECT false AS lCheck, code, name FROM states where 1 " )
DEFINE DIALOG oDlg SIZE 1000,600 PIXEL TRUEPIXEL
@ 20,20 XBROWSE oBrw SIZE -20,-20 PIXEL OF oDlg ;
DATASOURCE oRs AUTOCOLS CELL LINES NOBORDER
WITH OBJECT oBrw:lCheck
:SetLogical()
:SetCheck()
END
oBrw:CreateFromCode()
ACTIVATE DIALOG oDlg CENTERED
return nil
buenas tardes
Este codigo funciona me presenta la primera columna pero no marca ni con el mouse ni con la tecla SPACE
agradeceria si alguien sabe que me esta faltando
gracias por su ayuda
Att
Wilson
Re: xbrowse y setcheck Mr Rao please
Posted: Wed Apr 01, 2020 7:48 am
by Ariel
Wilson,
proba de ponerle :
:nEditType := EDIT_GET
Saludos.
Re: xbrowse y setcheck Mr Rao please
Posted: Wed Apr 01, 2020 12:56 pm
by wilsongamboa
Ariel muchas gracias pero lamentablemente no funciono
saludos
Wilson
Re: xbrowse y setcheck Mr Rao please
Posted: Wed Apr 01, 2020 2:24 pm
by armando.lagunas
generalmente los valores verdaderos o falsos de una base de datos son con un campo "BIT", en donde es:
0 = FALSE
1 = VERDADERO
entonces para que el check del oBrw funcione debes convertir el campo a .T. o .F.
0 = .F.
1 = .T.
Re: xbrowse y setcheck Mr Rao please
Posted: Thu Apr 02, 2020 4:50 pm
by wilsongamboa
me he quedado con
Code: Select all
WITH OBJECT oBrw:aCols[ 1 ]
:SetLogical()
:SetCheck()
:bEditValue := { || ascan( oBrw:aSelected, oBrw:BookMark ) > 0 }
END
oBrw:nMarqueeStyle := MARQSTYLE_HIGHLROWMS
funciona belleza
saludos
Re: xbrowse y setcheck Mr Rao please
Posted: Thu Apr 02, 2020 4:51 pm
by wilsongamboa
Muchas gracias Armando y Ariel de sus consejos puse hallar la solucion
Gracias
saludos
Re: xbrowse y setcheck Mr Rao please
Posted: Thu Apr 02, 2020 4:54 pm
by wilsongamboa
funciona belleza
gracias
Wilson
Re: xbrowse y setcheck Mr Rao please
Posted: Fri Apr 03, 2020 4:36 am
by nageswaragunupudi
Code: Select all
WITH OBJECT oBrw:lCheck
:SetLogical()
:SetCheck( nil, .t. )
END
Re: xbrowse y setcheck Mr Rao please
Posted: Fri Apr 03, 2020 7:53 pm
by wilsongamboa
Many Thanks Mr Rao
it's Works Good
best regards