FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour CheckBox en un xBrowse?
Posts: 3358
Joined: Fri Oct 07, 2005 08:20 PM
CheckBox en un xBrowse?
Posted: Mon Jul 01, 2024 07:09 PM
Amigos del foro:

En un xBrowse tengo una columna cuyo contenido es un campo l贸gico,
definido con el siguiente c贸digo: (No uso FASTEDIT)
Code (fw): Select all Collapse
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 WITH OBJECT :Acceso
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 :SetLogical()
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 :SetCheck(NIL,(.T.))
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 END
Si el usuario da doble clic sobre esta columna el contenido cambia de True a False y por ende
el 铆cono tambi茅n cambia, la duda y pregunta, c贸mo puedo evitar esto?, es decir que no sea
modificable la columna.

Saludos y gracias por el apoyo
SOI, s.a. de c.v.
estbucarm@gmail.com
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero
Posts: 1344
Joined: Wed Nov 16, 2005 09:14 PM
Re: CheckBox en un xBrowse?
Posted: Mon Jul 01, 2024 09:40 PM
Podria ser asi?
Code (fw): Select all Collapse
WITH OBJECT :Acceso
聽 聽 :SetLogical()
聽 聽 :nEditType := 0 // o EDIT_NONE
聽 聽 :SetCheck(NIL,(.T.))
END
Posts: 3358
Joined: Fri Oct 07, 2005 08:20 PM
Re: CheckBox en un xBrowse?
Posted: Mon Jul 01, 2024 10:06 PM

C茅sar:

No, no funcion贸, se sigue modificando el ICONO.

Saludos y gracias

SOI, s.a. de c.v.
estbucarm@gmail.com
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero
Posts: 514
Joined: Sun Oct 16, 2005 03:32 AM
Re: CheckBox en un xBrowse?
Posted: Mon Jul 01, 2024 10:53 PM
Armando,
Code (fw): Select all Collapse
// nCol : Columna que no se quiere editar
oBrw:aCols[ nCol ]:bLDClickData := {|| NIL }

Saludos,



Carlos Gallego



*** FWH-25.12, xHarbour 1.3.1 Build 20241008, Borland C++7.70, PellesC, ADS 11.1***

Posts: 3358
Joined: Fri Oct 07, 2005 08:20 PM
Re: CheckBox en un xBrowse?
Posted: Mon Jul 01, 2024 11:19 PM

Carlos:

Excelente soluci贸n, funcion贸 de 100.

Saludos

SOI, s.a. de c.v.
estbucarm@gmail.com
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: CheckBox en un xBrowse?
Posted: Tue Jul 02, 2024 09:05 AM
Simple
Code (fw): Select all Collapse
:SetCheck( NIL, .t. ) 聽// allows editing
:SetCheck( nil, .F. ) // does not allow eiditing
Regards



G. N. Rao.

Hyderabad, India
Posts: 3358
Joined: Fri Oct 07, 2005 08:20 PM
Re: CheckBox en un xBrowse?
Posted: Tue Jul 02, 2024 04:19 PM
Mr. Rao:

I'm afraid it doesn't work, the checkbox icon from off to on to off changes, with FASTEDIT and without FASTEDIT, here is my code
Code (fw): Select all Collapse
聽 聽 聽 聽 聽 聽 REDEFINE XBROWSE oBrx ID 300 OF oDlg;
聽 聽 聽 聽 聽 聽 聽 聽 DATASOURCE oRsMxu ;
聽 聽 聽 聽 聽 聽 聽 聽 COLUMNS "MOD_DES", "USU_ACC" ;
聽 聽 聽 聽 聽 聽 聽 聽 HEADERS "M贸dulo","Acceso";
聽 聽 聽 聽 聽 聽 聽 聽 COLSIZES 312,50;
聽 聽 聽 聽 聽 聽 聽 聽 PICTURES NIL,NIL;
聽 聽 聽 聽 聽 聽 聽 聽 JUSTIFY {AL_LEFT,AL_CENTER};
聽 聽 聽 聽 聽 聽 聽 聽 FOOTERS AUTOSORT //FASTEDIT

聽 聽 聽 聽 聽 聽 聽 聽 WITH OBJECT oBrx
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 :l2007 聽 聽 聽 聽 聽 聽:= (.F.)
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 :lHScroll 聽 聽 聽 聽 := (.F.)
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 :lVScroll 聽 聽 聽 聽 := (.F.)
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 :nMarqueeStyle 聽 聽:= MARQSTYLE_HIGHLROW
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 :nColDividerStyle := LINESTYLE_LIGHTGRAY
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 :nRowDividerStyle := LINESTYLE_LIGHTGRAY
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 :nStretchCol 聽 聽 聽:= STRETCHCOL_WIDEST
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 :nHeaderHeight聽 聽 聽 := 25
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 :nRowHeight聽聽 聽 聽 聽 := 22
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 :nFooterHeight聽 聽 聽 := 25
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 :bClrHeader 聽 聽 聽 := { || {CLR_WHITE,CLR_BLACK} }
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 :bClrFooter 聽 聽 聽 := { || {CLR_WHITE,CLR_BLACK} }
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 :bClrSel 聽 聽 聽 聽 聽:= { || IF( oBrx:KeyNo % oApp:nRowsInt == 0 ,{ CLR_BLACK, oApp:nRowParClr },{ CLR_BLACK, oApp:nRowNonClr }) }
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 :bClrSelFocus 聽 聽 := { || {oApp:nClrText, oApp:nClrBack} }
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 :bClrStd 聽 聽 聽 聽 聽:= { || IF( oBrx:KeyNo % oApp:nRowsInt == 0 ,{ CLR_BLACK, oApp:nRowParClr },{ CLR_BLACK, oApp:nRowNonClr }) }
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 :nRecSelColor 聽 聽 := oApp:nRowParClr
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 :lDisplayZeros 聽 聽:= (.F.)聽 聽// zero values are not displayed. Added by GNRao. No need to use @Z
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 :blDblClick 聽 聽 聽聽 聽:= { | nRow, nCol, nKey | (Autoriza(oBrx),oBrx:SetFocus())}
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 :bKeyDown 聽 聽 聽 聽聽 聽:= { | nKey, nFlags | IIF(nKey == VK_RETURN,(Autoriza(oBrx),oBrx:SetFocus()),)}

聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 WITH OBJECT :aCols[01]
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 :cOrder聽:= "A"
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 END

聽 聽 聽 聽 聽 聽 聽 聽WITH OBJECT :Acceso
聽 聽 聽 聽 聽 聽 聽 聽 聽 :SetLogical()
聽 聽 聽 聽 聽 聽 聽 聽 聽 :SetCheck(NIL,(.F.))
聽 聽 聽 聽 聽 聽 聽 聽END
聽 聽 聽 聽 聽 聽 END
With best regards
SOI, s.a. de c.v.
estbucarm@gmail.com
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero

Continue the discussion