buttons and datepick on xbrowse
- Silvio.Falconi
- Posts: 7163
- Joined: Thu Oct 18, 2012 7:17 pm
- Been thanked: 2 times
buttons and datepick on xbrowse
it is possible insert buttons and datepick into xbrowse
Last edited by Silvio.Falconi on Fri Mar 06, 2020 8:12 am, edited 1 time in total.
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
- Silvio.Falconi
- Posts: 7163
- Joined: Thu Oct 18, 2012 7:17 pm
- Been thanked: 2 times
Re: buttons and datepick on xbrowse
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
- Silvio.Falconi
- Posts: 7163
- Joined: Thu Oct 18, 2012 7:17 pm
- Been thanked: 2 times
Re: buttons and datepick on xbrowse
I made a small test but it make error on year and tdatepick
THE ERROR
The test
THE ERROR
Code: Select all | Expand
Error description: Error BASE/1112 Argument error: YEAR
Args:
[ 1] = C 19/02/2014
Stack Calls
===========
Called from: => YEAR( 0 )
Called from: .\source\classes\TDTPICKE.PRG => (b)TDATEPICK( 42 )
Called from: .\source\classes\TDTPICKE.PRG => TDATEPICK:SETDATE( 0 )
Called from: .\source\classes\TDTPICKE.PRG => TDATEPICK:_CTEXT( 205 )
Called from: .\source\classes\TDTPICKE.PRG => TDATEPICK:NEW( 109 )
Called from: .\source\classes\XBROWSE.PRG => TXBRWCOLUMN:EDITDATETIME( 14017 )
Called from: .\source\classes\XBROWSE.PRG => TXBRWCOLUMN:EDIT( 13711 )
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:LDBLCLICK( 4725 )
The test
Code: Select all | Expand
#include "fivewin.ch"
#include "constant.ch"
Function Main()
//ico
// tipo
// servizio
// quantità
// costo
// totale
// dal
// al
// gg
// sconto
// totale
local oDlg, oBrw, oLarge, oFont
Local aData:={ {"O","L","Ombrellone",1,10.00,10.00,"19/02/2014","19/02/2014",1,0.00,10.00},;
{"S","L","Sdraio",1,5.00,5.00,"19/02/2014","19/02/2014",2,0.00,10.00},;
{"L","L","Lettino",1,5.00,5.00,"19/02/2014","19/02/2014",2,0.00,10.00},;
{"R","L","Regista",1,5.00,5.00,"19/02/2014","19/02/2014",1,0.00,5.00} }
DEFINE FONT oLarge NAME "VERDANA" SIZE 0,-48 BOLD
DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-15
DEFINE DIALOG oDlg SIZE 800,260 PIXEL TRUEPIXEL FONT oFont ;
TITLE "Testing date"
@0,0 XBROWSE oBrw SIZE -20,200 PIXEL OF oDlg;
COLUMNS 1,2,3,4,5,6,7,8,9,10,11 ;
HEADERS "Ico","Type","Item Name","Qt.", "Amount","Total","From","To","Days""Descount","Total";
ARRAY aData CELL LINES FOOTERS NOBORDER FASTEDIT
oBrw:ItemName:cFooter:="Total"
WITH OBJECT oBrw:Amount
:nEditType := EDIT_GET
:cEditPicture := '@ €99,999.99'
:lTotal:=.T.
:nTotal:=0.00
END
WITH OBJECT oBrw:From
:nEditType := EDIT_DATE
END
WITH OBJECT oBrw:TO
:nEditType := EDIT_DATE
END
oBrw:MakeTotals()
oBrw:nStretchCol := STRETCHCOL_WIDEST
oBrw:CreateFromCode()
ACTIVATE DIALOG oDlg CENTERED
Return
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
- nageswaragunupudi
- Posts: 10729
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Been thanked: 10 times
- Contact:
Re: buttons and datepick on xbrowse
Change aData as
Code: Select all | Expand
local aData:={ {"O","L","Ombrellone",1,10.00,10.00,{^ 2014/02/19 },{^ 2014/02/19 },1,0.00,10.00},;
{"S","L","Sdraio",1,5.00,5.00,{^ 2014/02/19 },{^ 2014/02/19 },2,0.00,10.00},;
{"L","L","Lettino",1,5.00,5.00,{^ 2014/02/19 },{^ 2014/02/19 },2,0.00,10.00},;
{"R","L","Regista",1,5.00,5.00,{^ 2014/02/19 },{^ 2014/02/19 },1,0.00,5.00} }
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
- Silvio.Falconi
- Posts: 7163
- Joined: Thu Oct 18, 2012 7:17 pm
- Been thanked: 2 times
Re: buttons and datepick on xbrowse
Mr Rao,
I here I put an array but I have a dbf
then can I personalized the button of datepick ( now I not see the button)
How I can to insert before the 4th columns "Qt. " the buttons "+ "and "- " ?
can I use personalized bitmap button ?
thanks
I here I put an array but I have a dbf
then can I personalized the button of datepick ( now I not see the button)
How I can to insert before the 4th columns "Qt. " the buttons "+ "and "- " ?
can I use personalized bitmap button ?
thanks
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
- Silvio.Falconi
- Posts: 7163
- Joined: Thu Oct 18, 2012 7:17 pm
- Been thanked: 2 times
Re: buttons and datepick on xbrowse
Nages,
I tried to insert buttons as you see here but I have some problems
1) I wish the 4th Header must be together with 5th header sample :
2) How I can make when the user click on "-" or "+" add/minus the value of Quantity ?
3) Now On oBrw:aCols[ 8] and oBrw:aCols[ 9 ] I insert bitmaps but How I can call tdatepick class ? to select a date ?
thanks
I tried to insert buttons as you see here but I have some problems
1) I wish the 4th Header must be together with 5th header sample :
2) How I can make when the user click on "-" or "+" add/minus the value of Quantity ?
3) Now On oBrw:aCols[ 8] and oBrw:aCols[ 9 ] I insert bitmaps but How I can call tdatepick class ? to select a date ?
thanks
Last edited by Silvio.Falconi on Fri Mar 06, 2020 8:12 am, edited 1 time in total.
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Re: buttons and datepick on xbrowse
Silvio,
oBrwcp:aCols[9]:nDataStrAlign := AL_RIGHT
oBrwcp:aCols[9]:nHeadStrAlign := AL_CENTER
oBrwcp:aCols[9]:cHeader := 'Bonificado'
oBrwcp:aCols[9]:nWidth := 60
oBrwcp:aCols[9]:bEditValue := {|| aHistoricoComprasProdutos[oBrwcp:nArrayAt,10]}
oBrwcp:aCols[9]:cEditPicture := '@E 99,999.999'
oBrwcp:AddCol()
oBrwcp:aCols[10]:nDataStrAlign := AL_CENTER
oBrwcp:aCols[10]:nHeadStrAlign := AL_CENTER
oBrwcp:aCols[10]:cHeader := '-'
oBrwcp:aCols[10]:cBtnCaption := '-'
oBrwcp:aCols[10]:cEditPicture := '@!'
oBrwcp:aCols[10]:nWidth := 16
oBrwcp:aCols[10]:nBtnWidth := 12
oBrwcp:aCols[10]:nEditType := EDIT_GET_BUTTON
oBrwcp:aCols[10]:bStrData := {|| ''}
oBrwcp:aCols[10]:bEditBlock := {|| Produto_Bonificar_Menos( oBrwcp, aHistoricoComprasProdutos ), NIL}
oBrwcp:aCols[10]:bEditWhen := {|| .f. }
oBrwcp:AddCol()
oBrwcp:aCols[11]:nDataStrAlign := AL_CENTER
oBrwcp:aCols[11]:nHeadStrAlign := AL_CENTER
oBrwcp:aCols[11]:cHeader := '+'
oBrwcp:aCols[11]:cBtnCaption := '+'
oBrwcp:aCols[11]:cEditPicture := '@!'
oBrwcp:aCols[11]:nWidth := 16
oBrwcp:aCols[11]:nBtnWidth := 12
oBrwcp:aCols[11]:nEditType := EDIT_GET_BUTTON
oBrwcp:aCols[11]:bStrData := {|| ''}
oBrwcp:aCols[11]:bEditBlock := {|| Produto_Bonificar_Mais( oBrwcp, aHistoricoComprasProdutos ), NIL}
oBrwcp:aCols[11]:bEditWhen := {|| .f. }
oBrwcp:aCols[12]:nDataStrAlign := AL_RIGHT
oBrwcp:aCols[12]:nHeadStrAlign := AL_CENTER
oBrwcp:aCols[12]:cHeader := 'Valor'+CRLF+'Unitário'
oBrwcp:aCols[12]:nWidth := 60
oBrwcp:aCols[12]:bEditValue := {|| aHistoricoComprasProdutos[oBrwcp:nArrayAt,9]}
oBrwcp:aCols[12]:cEditPicture := '@E 99,999.99'
//calend
oBrowse:aCols[2]:AddResource('CALEND')
oBrowse:aCols[2]:nBtnBmp := 1
oBrowse:aCols[2]:lBmpStretch := .f.
oBrowse:aCols[2]:lBmpTransparent := .t.
oBrowse:aCols[2]:nDataBmpAlign := AL_CENTER
oBrowse:aCols[2]:nHeadStrAlign := AL_CENTER
oBrowse:aCols[2]:nFootStrAlign := AL_RIGHT
oBrowse:aCols[2]:nDataStrAlign := oBrowse:aCols[2]:DefStyle(AL_LEFT,.f.)
oBrowse:aCols[2]:cHeader := 'Vencimento'
oBrowse:aCols[2]:nBtnWidth := 30
oBrowse:aCols[2]:nWidth := 160
oBrowse:aCols[2]:cEditPicture := '@!'
oBrowse:aCols[2]:bEditValue := {|| aParcelasModalidade[oBrowse:nArrayAt,3]}
oBrowse:aCols[2]:nEditType := EDIT_GET_BUTTON
oBrowse:aCols[2]:bOnPostEdit := {| oCol, xVal, nKey | IIf( nKey == VK_RETURN,(aParcelasModalidade[oBrowse:nArrayAt,3] := xVal, oBrowse:Refresh()),) }
oBrowse:aCols[2]:bEditBlock := {|r,c| IIf(!Empty(aParcelasModalidade[oBrowse:nArrayAt,1]), aParcelasModalidade[oBrowse:nArrayAt,3] := Calend(aParcelasModalidade[oBrowse:nArrayAt,3], r, c + 150, oDialog),) }
oBrowse:aCols[2]:bFooter := {|| 'Total:'}
oBrowse:aCols[2]:bEditWhen := {|| !Empty(aParcelasModalidade[oBrowse:nArrayAt,1]) }
oBrowse:aCols[2]:lUseBtnWidthEditOfCol := .t.
/*************************************************/
function Calend(dDate, nRow, nCol, oDlg)
/*
*/
Local oDlf, lSelecao := .f., oCalend, dDataCalend := IIf(!Empty(dDate), dDate, Date()), oBtn[2]
RetornaRowColDoObj(oDlg, @nRow, @nCol)
define dialog oDlf resource 'CALEND2' transparent font M->oWnd:ofont color CLR_WHITE,CLR_WHITE
redefine calendar ocalend var ddatacalend id 2001 of oDlf;
dblclick(oBtn[1]:Click());
action(oBtn[1]:Click())
redefine button oBtn[1] id 104 of odlf action(lSelecao := .t., dDate := dDataCalend, oDlf:End())
redefine button oBtn[2] id 103 of odlf action(lSelecao := .f., oDlf:End()) cancel
oDlf:lHelpicon := .f.
activate dialog oDlf on init(IIf(ValType( nRow ) != 'N', WndCenter(oDlf:hWnd), oDlf:move(nRow,nCol)))
return(dDate)
/*************************************************************************************************************/
procedure RetornaRowColDoObj(oObj, nRow, nCol)
/*
*/
local aPos, nLen
if HB_IsObject(oObj)
aPos := oObj:GetRect()
if ValType(nRow) == 'N'
nRow += aPos:nTop
nCol += aPos:nLeft
endif
if (nLen := (GetSysMetrics(1)-(nRow+254))) < 0
nRow += nLen
endif
if (nLen := (GetSysMetrics(0)-(nCol+158))) < 0
nCol += nLen
end
endif
return
oBrwcp:aCols[9]:nDataStrAlign := AL_RIGHT
oBrwcp:aCols[9]:nHeadStrAlign := AL_CENTER
oBrwcp:aCols[9]:cHeader := 'Bonificado'
oBrwcp:aCols[9]:nWidth := 60
oBrwcp:aCols[9]:bEditValue := {|| aHistoricoComprasProdutos[oBrwcp:nArrayAt,10]}
oBrwcp:aCols[9]:cEditPicture := '@E 99,999.999'
oBrwcp:AddCol()
oBrwcp:aCols[10]:nDataStrAlign := AL_CENTER
oBrwcp:aCols[10]:nHeadStrAlign := AL_CENTER
oBrwcp:aCols[10]:cHeader := '-'
oBrwcp:aCols[10]:cBtnCaption := '-'
oBrwcp:aCols[10]:cEditPicture := '@!'
oBrwcp:aCols[10]:nWidth := 16
oBrwcp:aCols[10]:nBtnWidth := 12
oBrwcp:aCols[10]:nEditType := EDIT_GET_BUTTON
oBrwcp:aCols[10]:bStrData := {|| ''}
oBrwcp:aCols[10]:bEditBlock := {|| Produto_Bonificar_Menos( oBrwcp, aHistoricoComprasProdutos ), NIL}
oBrwcp:aCols[10]:bEditWhen := {|| .f. }
oBrwcp:AddCol()
oBrwcp:aCols[11]:nDataStrAlign := AL_CENTER
oBrwcp:aCols[11]:nHeadStrAlign := AL_CENTER
oBrwcp:aCols[11]:cHeader := '+'
oBrwcp:aCols[11]:cBtnCaption := '+'
oBrwcp:aCols[11]:cEditPicture := '@!'
oBrwcp:aCols[11]:nWidth := 16
oBrwcp:aCols[11]:nBtnWidth := 12
oBrwcp:aCols[11]:nEditType := EDIT_GET_BUTTON
oBrwcp:aCols[11]:bStrData := {|| ''}
oBrwcp:aCols[11]:bEditBlock := {|| Produto_Bonificar_Mais( oBrwcp, aHistoricoComprasProdutos ), NIL}
oBrwcp:aCols[11]:bEditWhen := {|| .f. }
oBrwcp:aCols[12]:nDataStrAlign := AL_RIGHT
oBrwcp:aCols[12]:nHeadStrAlign := AL_CENTER
oBrwcp:aCols[12]:cHeader := 'Valor'+CRLF+'Unitário'
oBrwcp:aCols[12]:nWidth := 60
oBrwcp:aCols[12]:bEditValue := {|| aHistoricoComprasProdutos[oBrwcp:nArrayAt,9]}
oBrwcp:aCols[12]:cEditPicture := '@E 99,999.99'
//calend
oBrowse:aCols[2]:AddResource('CALEND')
oBrowse:aCols[2]:nBtnBmp := 1
oBrowse:aCols[2]:lBmpStretch := .f.
oBrowse:aCols[2]:lBmpTransparent := .t.
oBrowse:aCols[2]:nDataBmpAlign := AL_CENTER
oBrowse:aCols[2]:nHeadStrAlign := AL_CENTER
oBrowse:aCols[2]:nFootStrAlign := AL_RIGHT
oBrowse:aCols[2]:nDataStrAlign := oBrowse:aCols[2]:DefStyle(AL_LEFT,.f.)
oBrowse:aCols[2]:cHeader := 'Vencimento'
oBrowse:aCols[2]:nBtnWidth := 30
oBrowse:aCols[2]:nWidth := 160
oBrowse:aCols[2]:cEditPicture := '@!'
oBrowse:aCols[2]:bEditValue := {|| aParcelasModalidade[oBrowse:nArrayAt,3]}
oBrowse:aCols[2]:nEditType := EDIT_GET_BUTTON
oBrowse:aCols[2]:bOnPostEdit := {| oCol, xVal, nKey | IIf( nKey == VK_RETURN,(aParcelasModalidade[oBrowse:nArrayAt,3] := xVal, oBrowse:Refresh()),) }
oBrowse:aCols[2]:bEditBlock := {|r,c| IIf(!Empty(aParcelasModalidade[oBrowse:nArrayAt,1]), aParcelasModalidade[oBrowse:nArrayAt,3] := Calend(aParcelasModalidade[oBrowse:nArrayAt,3], r, c + 150, oDialog),) }
oBrowse:aCols[2]:bFooter := {|| 'Total:'}
oBrowse:aCols[2]:bEditWhen := {|| !Empty(aParcelasModalidade[oBrowse:nArrayAt,1]) }
oBrowse:aCols[2]:lUseBtnWidthEditOfCol := .t.
/*************************************************/
function Calend(dDate, nRow, nCol, oDlg)
/*
*/
Local oDlf, lSelecao := .f., oCalend, dDataCalend := IIf(!Empty(dDate), dDate, Date()), oBtn[2]
RetornaRowColDoObj(oDlg, @nRow, @nCol)
define dialog oDlf resource 'CALEND2' transparent font M->oWnd:ofont color CLR_WHITE,CLR_WHITE
redefine calendar ocalend var ddatacalend id 2001 of oDlf;
dblclick(oBtn[1]:Click());
action(oBtn[1]:Click())
redefine button oBtn[1] id 104 of odlf action(lSelecao := .t., dDate := dDataCalend, oDlf:End())
redefine button oBtn[2] id 103 of odlf action(lSelecao := .f., oDlf:End()) cancel
oDlf:lHelpicon := .f.
activate dialog oDlf on init(IIf(ValType( nRow ) != 'N', WndCenter(oDlf:hWnd), oDlf:move(nRow,nCol)))
return(dDate)
/*************************************************************************************************************/
procedure RetornaRowColDoObj(oObj, nRow, nCol)
/*
*/
local aPos, nLen
if HB_IsObject(oObj)
aPos := oObj:GetRect()
if ValType(nRow) == 'N'
nRow += aPos:nTop
nCol += aPos:nLeft
endif
if (nLen := (GetSysMetrics(1)-(nRow+254))) < 0
nRow += nLen
endif
if (nLen := (GetSysMetrics(0)-(nCol+158))) < 0
nCol += nLen
end
endif
return
- Silvio.Falconi
- Posts: 7163
- Joined: Thu Oct 18, 2012 7:17 pm
- Been thanked: 2 times
Re: buttons and datepick on xbrowse
thanks but I found how insert button now I have other problems
Please see this message
viewtopic.php?f=3&t=35604#p211980
Please see this message
viewtopic.php?f=3&t=35604#p211980
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Re: buttons and datepick on xbrowse
3) Agora no oBrw: aCols [8] e oBrw: aCols [9] eu insiro bitmaps mas como eu posso chamar tdatepick classe? selecionar uma data?
//calend
oBrowse:aCols[2]:AddResource('CALEND')
oBrowse:aCols[2]:nBtnBmp := 1
oBrowse:aCols[2]:lBmpStretch := .f.
oBrowse:aCols[2]:lBmpTransparent := .t.
oBrowse:aCols[2]:nDataBmpAlign := AL_CENTER
oBrowse:aCols[2]:nHeadStrAlign := AL_CENTER
oBrowse:aCols[2]:nFootStrAlign := AL_RIGHT
oBrowse:aCols[2]:nDataStrAlign := oBrowse:aCols[2]:DefStyle(AL_LEFT,.f.)
oBrowse:aCols[2]:cHeader := 'Vencimento'
oBrowse:aCols[2]:nBtnWidth := 30
oBrowse:aCols[2]:nWidth := 160
oBrowse:aCols[2]:cEditPicture := '@!'
oBrowse:aCols[2]:bEditValue := {|| aParcelasModalidade[oBrowse:nArrayAt,3]}
oBrowse:aCols[2]:nEditType := EDIT_GET_BUTTON
oBrowse:aCols[2]:bOnPostEdit := {| oCol, xVal, nKey | IIf( nKey == VK_RETURN,(aParcelasModalidade[oBrowse:nArrayAt,3] := xVal, oBrowse:Refresh()),) }
oBrowse:aCols[2]:bEditBlock := {|r,c| IIf(!Empty(aParcelasModalidade[oBrowse:nArrayAt,1]), aParcelasModalidade[oBrowse:nArrayAt,3] := Calend(aParcelasModalidade[oBrowse:nArrayAt,3], r, c + 150, oDialog),) }
oBrowse:aCols[2]:bFooter := {|| 'Total:'}
oBrowse:aCols[2]:bEditWhen := {|| !Empty(aParcelasModalidade[oBrowse:nArrayAt,1]) }
oBrowse:aCols[2]:lUseBtnWidthEditOfCol := .t.
/*************************************************/
function Calend(dDate, nRow, nCol, oDlg)
/*
*/
Local oDlf, lSelecao := .f., oCalend, dDataCalend := IIf(!Empty(dDate), dDate, Date()), oBtn[2]
RetornaRowColDoObj(oDlg, @nRow, @nCol)
define dialog oDlf resource 'CALEND2' transparent font M->oWnd:ofont color CLR_WHITE,CLR_WHITE
redefine calendar ocalend var ddatacalend id 2001 of oDlf;
dblclick(oBtn[1]:Click());
action(oBtn[1]:Click())
redefine button oBtn[1] id 104 of odlf action(lSelecao := .t., dDate := dDataCalend, oDlf:End())
redefine button oBtn[2] id 103 of odlf action(lSelecao := .f., oDlf:End()) cancel
oDlf:lHelpicon := .f.
activate dialog oDlf on init(IIf(ValType( nRow ) != 'N', WndCenter(oDlf:hWnd), oDlf:move(nRow,nCol)))
return(dDate)
/*************************************************************************************************************/
procedure RetornaRowColDoObj(oObj, nRow, nCol)
/*
*/
local aPos, nLen
if HB_IsObject(oObj)
aPos := oObj:GetRect()
if ValType(nRow) == 'N'
nRow += aPos:nTop
nCol += aPos:nLeft
endif
if (nLen := (GetSysMetrics(1)-(nRow+254))) < 0
nRow += nLen
endif
if (nLen := (GetSysMetrics(0)-(nCol+158))) < 0
nCol += nLen
end
endif
return
//calend
oBrowse:aCols[2]:AddResource('CALEND')
oBrowse:aCols[2]:nBtnBmp := 1
oBrowse:aCols[2]:lBmpStretch := .f.
oBrowse:aCols[2]:lBmpTransparent := .t.
oBrowse:aCols[2]:nDataBmpAlign := AL_CENTER
oBrowse:aCols[2]:nHeadStrAlign := AL_CENTER
oBrowse:aCols[2]:nFootStrAlign := AL_RIGHT
oBrowse:aCols[2]:nDataStrAlign := oBrowse:aCols[2]:DefStyle(AL_LEFT,.f.)
oBrowse:aCols[2]:cHeader := 'Vencimento'
oBrowse:aCols[2]:nBtnWidth := 30
oBrowse:aCols[2]:nWidth := 160
oBrowse:aCols[2]:cEditPicture := '@!'
oBrowse:aCols[2]:bEditValue := {|| aParcelasModalidade[oBrowse:nArrayAt,3]}
oBrowse:aCols[2]:nEditType := EDIT_GET_BUTTON
oBrowse:aCols[2]:bOnPostEdit := {| oCol, xVal, nKey | IIf( nKey == VK_RETURN,(aParcelasModalidade[oBrowse:nArrayAt,3] := xVal, oBrowse:Refresh()),) }
oBrowse:aCols[2]:bEditBlock := {|r,c| IIf(!Empty(aParcelasModalidade[oBrowse:nArrayAt,1]), aParcelasModalidade[oBrowse:nArrayAt,3] := Calend(aParcelasModalidade[oBrowse:nArrayAt,3], r, c + 150, oDialog),) }
oBrowse:aCols[2]:bFooter := {|| 'Total:'}
oBrowse:aCols[2]:bEditWhen := {|| !Empty(aParcelasModalidade[oBrowse:nArrayAt,1]) }
oBrowse:aCols[2]:lUseBtnWidthEditOfCol := .t.
/*************************************************/
function Calend(dDate, nRow, nCol, oDlg)
/*
*/
Local oDlf, lSelecao := .f., oCalend, dDataCalend := IIf(!Empty(dDate), dDate, Date()), oBtn[2]
RetornaRowColDoObj(oDlg, @nRow, @nCol)
define dialog oDlf resource 'CALEND2' transparent font M->oWnd:ofont color CLR_WHITE,CLR_WHITE
redefine calendar ocalend var ddatacalend id 2001 of oDlf;
dblclick(oBtn[1]:Click());
action(oBtn[1]:Click())
redefine button oBtn[1] id 104 of odlf action(lSelecao := .t., dDate := dDataCalend, oDlf:End())
redefine button oBtn[2] id 103 of odlf action(lSelecao := .f., oDlf:End()) cancel
oDlf:lHelpicon := .f.
activate dialog oDlf on init(IIf(ValType( nRow ) != 'N', WndCenter(oDlf:hWnd), oDlf:move(nRow,nCol)))
return(dDate)
/*************************************************************************************************************/
procedure RetornaRowColDoObj(oObj, nRow, nCol)
/*
*/
local aPos, nLen
if HB_IsObject(oObj)
aPos := oObj:GetRect()
if ValType(nRow) == 'N'
nRow += aPos:nTop
nCol += aPos:nLeft
endif
if (nLen := (GetSysMetrics(1)-(nRow+254))) < 0
nRow += nLen
endif
if (nLen := (GetSysMetrics(0)-(nCol+158))) < 0
nCol += nLen
end
endif
return
- Silvio.Falconi
- Posts: 7163
- Joined: Thu Oct 18, 2012 7:17 pm
- Been thanked: 2 times
Re: buttons and datepick on xbrowse
thanks but I resolved
it is not saved because when I open the dbf it was exclusive
then Mr. Rao sad not use bOnPostEdit it is a feature of Past!!!
only I cannot erasee the line of the header of
- 1+
it is not saved because when I open the dbf it was exclusive
then Mr. Rao sad not use bOnPostEdit it is a feature of Past!!!
only I cannot erasee the line of the header of
- 1+
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Re: buttons and datepick on xbrowse
hola silvio , consuta como pudiste poner 2 botones en una celda
saludos
saludos
- Silvio.Falconi
- Posts: 7163
- Joined: Thu Oct 18, 2012 7:17 pm
- Been thanked: 2 times
Re: buttons and datepick on xbrowse
on the new release can insert the buttons or you must create two columns
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Re: buttons and datepick on xbrowse
Hola Silvio, gracias por responder, pero tu tienes un ejemplo de como lo hiciste por favor
saludos
saludos
- Silvio.Falconi
- Posts: 7163
- Joined: Thu Oct 18, 2012 7:17 pm
- Been thanked: 2 times
Re: buttons and datepick on xbrowse
Please
do not claim the sources from me (it is already in two TOPICS that you give the SAME THING)
PLEASE SEE HERE
viewtopic.php?f=3&t=35626#p212105
If you search on forum you found it
do not claim the sources from me (it is already in two TOPICS that you give the SAME THING)
PLEASE SEE HERE
viewtopic.php?f=3&t=35626#p212105
If you search on forum you found it
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com