salve a tutti,
in un programma uso le classi tcbrowse e tccolumn per gestire un dbase,
è possibile cambiare dati logici con una checkbox invece di inserire F o T?
(fwh7.1 con xHarbour 0.99.71)
grazie, marzio
Moderator: Enrico Maria Giordano
#include "Fivewin.ch"
FUNCTION MAIN()
LOCAL oDlg, oBrw
LOCAL hBmp1 := READBITMAP( 0, "SELECT.BMP" )
LOCAL hBmp2 := READBITMAP( 0, "UNSELECT.BMP" )
USE TEST
DEFINE DIALOG oDlg SIZE 400, 300
@ 0, 0 LISTBOX oBrw FIELDS FIELD -> last,;
FIELD -> first,;
IF( FIELD -> married, hBmp1, hBmp2 ),;
"";
HEADERS "LAST", "FIRST", "M", "";
SIZES 100, 100, 16, 0
oBrw:bLClicked = { | nRow, nCol | Cambia( oBrw, nCol ) }
ACTIVATE DIALOG oDlg;
ON INIT oDlg:SetControl( oBrw );
CENTER
CLOSE
DELETEOBJECT( hBmp1 )
DELETEOBJECT( hBmp2 )
RETURN NIL
STATIC FUNCTION CAMBIA( oBrw, nCol )
IF oBrw:nAtCol( nCol ) = 3
REPLACE FIELD -> married WITH !FIELD -> married
oBrw:Refresh( .F. )
ENDIF
RETURN NIL
Return to All products support
Users browsing this forum: No registered users and 1 guest