code
Code: Select all
function XbrSetupBar( oBrw )
local oCursorBtn :=TCursor():New(,'HAND')
oBrw:nTopBarHeight := 42
oBrw:bOnAdjust := <||
local oBtnBar[3]
@ 05,05 BTNBMP oBtnBar[1] FILE "MOD_NUOVO" SIZE 40,30 PIXEL OF oBrw NOBORDER ;
ACTION oBrw:EditSource( .t. ) TOOLTIP "Add New Record"
@ 05,45 BTNBMP oBtnBar[2] FILE "MOD_MODIFICA" SIZE 40,30 PIXEL OF oBrw NOBORDER ;
ACTION oBrw:EditSource() TOOLTIP "Edit this record"
@ 05,85 BTNBMP oBtnBar[3] FILE "MOD_CANCELLA" SIZE 40,30 PIXEL OF oBrw NOBORDER ;
ACTION If( MsgNoYes( "Delete this row?" ),,oBrw:Delete() ) TOOLTIP "Delete This Record"
For n= 1 to 3
oBtnBar[n]:bClrGrad = { | lInvert | If( ! lInvert,;
{ { 1, RGB( 225, 225, 225 ), RGB( 225, 225, 225 ) } },;
{ { 1, RGB( 229,241,251 ), RGB( 229,241,251 ) } } ) }
oBtnBar[n]:nClrBorder := nRgb(218,214,179)
oBtnBar[n]:oCursor:= oCursorBtn
next
return nil
>
return nil